Hi there! I've looking in the forums the reason to my problem, but once i couldn't find anyone with this problem, i decided to post this question. So i installed Jasager on my fonera, and configured the dnsmasq as a DHCP server, (also edited some init scripts to automatically start the wireless interface and karma), but something strange is happening. When a client tries to connect to the jasager, the jasager sees de DHCPDiscover packet and replies with a DHCPOffer, but the real problem is that there is no DHCPAck on the client side. I tried this with different clients, but the problema remains... I am leaving here the configuration files so that anyone can spot any problem.
/etc/config/network
config 'interface' 'loopback'
option 'ifname' 'lo'
option 'proto' 'static'
option 'ipaddr' '127.0.0.1'
option 'netmask' '255.0.0.0'
config 'interface' 'lan'
option 'ifname' 'eth0'
option 'type' 'bridge'
option 'proto' 'static'
option 'ipaddr' '192.168.0.2'
option 'netmask' '255.255.255.0'
option 'gateway' '192.168.0.1'
option 'dns' '8.8.8.8'
config 'interface' 'wifi'
option 'ifname' 'ath0'
option 'proto' 'static'
option 'ipaddr' '192.168.0.3'
option 'netmask' '255.255.255.0'
/etc/config/dhcp
config 'dnsmasq'
option 'domainneeded' '1'
option 'boguspriv' '0'
option 'filterwin2k' '0'
option 'localise_queries' '1'
option 'local' '/lan/'
option 'domain' 'lan'
option 'expandhosts' '1'
option 'nonegcache' '0'
option 'authoritative' '1'
option 'readethers' '1'
option 'leasefile' '/tmp/dhcp.leases'
option 'resolvfile' '/tmp/resolv.conf.auto'
config 'dhcp' 'lan'
option 'interface' 'lan'
option 'start' '100'
option 'limit' '150'
list 'dhcp_option' '1,255.255.255.0'
list 'dhcp_option' '3,192.168.0.1'
list 'dhcp_option' '6,8.8.8.8'
option 'leasetime' '60m'
config 'dhcp' 'wan'
option 'interface' 'wan'
option 'ignore' '1'
/etc/init.d/jasager
#!/bin/sh /etc/rc.common
# Copyright (C) 2008 dninja@gmail.com
START=50
start() {
include /lib/network
scan_interfaces
wlanconfig ath0 create wlandev wifi0 wlanmode master 2>&1 > /dev/null
ifconfig ath0 192.168.0.3 netmask 255.255.255.0 up
/karma/bin/create_option_list.rb
[ -d /karma/www -a -f /karma/etc/httpd.conf ] && httpd -p 1471 -h /karma/www -r karma -c /karma/etc/httpd.conf
iptables -I FORWARD -i ath0 -o br-lan -j ACCEPT
logread -f | awk '{if ($0 ~ /(KARMA: |DHCPACK|DHCPDISCOVER|DHCPOFFER|DHCPREQUEST)/) {sub (/ \(.*\).*: /, ": ", $0); print $0 ;}} ' > /tmp/status.log &
tail -f /tmp/status.log | /karma/bin/logwatch &
}
stop() {
killall httpd
}
Log example:
Jan 1 04:53:00 OpenWrt daemon.info dnsmasq[3327]: DHCPOFFER(ath0) 192.168.0.126 00:17:9a:7c:19:07
Jan 1 04:53:14 OpenWrt daemon.info dnsmasq[3327]: DHCPDISCOVER(ath0) 00:17:9a:7c:19:07
Jan 1 04:53:14 OpenWrt daemon.info dnsmasq[3327]: DHCPOFFER(ath0) 192.168.0.126 00:17:9a:7c:19:07
The setup i am trying to configure is something like jasager (lan: 192.168.0.2, wifi: 192.168.0.3)-> BT5 MITM(lan: 192.168.0.1) -> Internet router
I believe i am not missing anything, in any case just ask.
Thanks ;)