Jump to content

Jasager With Dnsmasq Problems


Recommended Posts

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 ;)

Link to comment
Share on other sites

You should have your LAN card hooked to the Fon/Jasager/Pineapple on a different network than the internet router.

Here is my setup guide I did to build a V1 Pineapple after I purchased the FON2100

http://goo.gl/5yYit

Here is a diagram I made at the same time to explain my setup of what my typical setup is.

https://picasaweb.google.com/lh/photo/X5ucfqUoE5uqPk4XllsyJA?feat=directlink

I have posted this many times on the forums... You need to level up your searching skills ;)

Edited by Mr-Protocol
Link to comment
Share on other sites

The internet router is on a different subnet than the lan card that is hooked up to the jasager (192.168.1.x internet router). Even with the ethernet cable disconnected, the jasager should be able to address a dhcp ip to a wireless client... I saw your tutorial, and my setup was based on yours, but maybe the problem is in the dnsmasq config file. I searched for this problem here, and saw no one with this, that's why i asked ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...