<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>







<p class="p1">Hi Gerd,</p>
<p class="p2"><br></p>
<p class="p3"><span class="s1">I don’t know why the content is not received in the mail list. It is shown correctly in the forum post here : <a href="http://voyage-linux.34677.n3.nabble.com/DHCP-server-not-working-using-dnsmasq-config-and-nat-sh-scripts-td4026374.html"><span class="s2">http://voyage-linux.34677.n3.nabble.com/DHCP-server-not-working-using-dnsmasq-config-and-nat-sh-scripts-td4026374.html</span></a></span></p>
<p class="p2"><br></p>
<p class="p1">However, I tried with Windows, Linux, Android and even SmartTV clients :) none of them gets an IP address. The thing that bugs me is that even if I set the manual IP on the client, I will never reach the gateway on the AP.</p>
<p class="p2"><br></p>
<p class="p1">I am copy pasting the files so the mail list can read:</p>
<p class="p2"><br></p>
<p class="p1">/etc/network/interfaces.d/wlan0.conf </p>
<p class="p4">auto wlan0</p>
<p class="p4">iface wlan0 inet static</p>
<p class="p4">        address 192.168.1.247</p>
<p class="p4">        netmask 255.255.255.0</p>
<p class="p4">        gateway 192.168.1.1</p>
<p class="p4">        dns-nameservers 192.168.1.1 80.58.61.250</p>
<p class="p4">        #wpa-driver wext</p>
<p class="p4">        wpa-ssid My_SSID</p>
<p class="p4">        wpa-psk xxxxxxxxxxxxxxx</p>
<p class="p4">        wpa-key-mgmt WPA-PSK</p>
<p class="p4">        ## for WPA</p>
<p class="p4">        wpa-pairwise TKIP</p>
<p class="p4">        wpa-group TKIP</p>
<p class="p4">        wpa-proto WPA</p>
<p class="p4">        ## for WPA2</p>
<p class="p4">        #wpa-pairwise CCMP TKIP</p>
<p class="p4">        #wpa-group CCMP TKIP</p>
<p class="p4">        #wpa-proto RSN</p>
<p class="p4">        #wireless-mode Managed</p>
<p class="p2"><br></p>
<p class="p1">/etc/network/interfaces.d/wlan1.conf </p>
<p class="p4">auto wlan1</p>
<p class="p4">iface wlan1 inet static</p>
<p class="p4">        address 192.168.3.1</p>
<p class="p4">        netmask 255.255.255.0</p>
<p class="p4">        broadcast 192.168.3.255</p>
<p class="p4">        hostapd /etc/hostapd/hostapd.wlan1.conf</p>
<p class="p4">        up nat.sh wlan1 wlan0 "192.168.3.0/24"</p>
<p class="p2"><br></p>
<p class="p1">/etc/hostapd/hostapd.wlan1.conf </p>
<p class="p4">interface=wlan1</p>
<p class="p4">driver=nl80211</p>
<p class="p4">ssid=testing</p>
<p class="p4">channel=11</p>
<p class="p4">hw_mode=g</p>
<p class="p4">auth_algs=3</p>
<p class="p4">ignore_broadcast_ssid=0</p>
<p class="p4">wep_default_key=1</p>
<p class="p4">wep_key1="abcde"</p>
<p class="p4">wep_key_len_broadcast="5"</p>
<p class="p4">wep_key_len_unicast="5"</p>
<p class="p4">wep_rekey_period=300</p>
<p class="p2"><br></p>
<p class="p1">/etc/dnsmasq.more.conf </p>
<p class="p4">interface=wlan1</p>
<p class="p4">dhcp-range=192.168.3.10,192.168.3.250,12h</p>
<p class="p4">dhcp-leasefile=/var/tmp/dnsmasq.leases</p>
<p class="p2"><br></p>
<p class="p1">iptables --list </p>
<p class="p4">Chain INPUT (policy ACCEPT)</p>
<p class="p4">target     prot opt source               destination</p>
<p class="p5"><br></p>
<p class="p4">Chain FORWARD (policy ACCEPT)</p>
<p class="p4">target     prot opt source               destination</p>
<p class="p4">wlan1-INBOUND  all  --  anywhere             192.168.3.0/24</p>
<p class="p4">wlan1-FORWARD  all  --  192.168.3.0/24       anywhere</p>
<p class="p5"><br></p>
<p class="p4">Chain OUTPUT (policy ACCEPT)</p>
<p class="p4">target     prot opt source               destination</p>
<p class="p5"><br></p>
<p class="p4">Chain wlan1-FORWARD (1 references)</p>
<p class="p4">target     prot opt source               destination</p>
<p class="p4">ACCEPT     all  --  192.168.3.0/24       anywhere</p>
<p class="p5"><br></p>
<p class="p4">Chain wlan1-INBOUND (1 references)</p>
<p class="p4">target     prot opt source               destination</p>
<p class="p4">ACCEPT     all  --  anywhere             192.168.3.0/24</p>
<p class="p2"><br></p>
<p class="p1">tail -f /var/log/syslog (on client auth) </p>
<p class="p4">Aug 10 21:33:27 localhost dnsmasq[3062]: reading /var/run/dnsmasq/resolv.conf</p>
<p class="p4">Aug 10 21:33:27 localhost dnsmasq[3062]: using nameserver 80.58.61.250#53</p>
<p class="p4">Aug 10 21:33:27 localhost dnsmasq[3062]: using nameserver 192.168.1.1#53</p>
<p class="p4">Aug 10 21:34:50 localhost hostapd: wlan1: STA 4c:74:03:21:d4:42 IEEE 802.11: authenticated</p>
<p class="p4">Aug 10 21:34:50 localhost hostapd: wlan1: STA 4c:74:03:21:d4:42 IEEE 802.11: associated (aid 1)</p>
<p class="p4">Aug 10 21:34:50 localhost hostapd: wlan1: STA 4c:74:03:21:d4:42 RADIUS: starting accounting session 55C91884-00000000</p>
<p class="p2"><br></p>
<p class="p1">Routing table</p>
<p class="p4">Kernel IP routing table</p>
<p class="p4">Destination     Gateway         Genmask         Flags Metric Ref    Use Iface</p>
<p class="p4">0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0</p>
<p class="p4">192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0</p>
<p class="p4">192.168.3.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan1</p><br><br><div>> Date: Tue, 11 Aug 2015 19:33:24 +0200<br>> From: gerd.bitzer@web.de<br>> To: cotarelo2@hotmail.com<br>> Subject: Re: [Voyage-linux] DHCP server not working using dnsmasq config and nat.sh scripts<br>> <br>> Hi,<br>> <br>> On 08/11/2015 06:41 PM, cotarelo2 wrote:<br>> > Hi :)<br>> ><br>> > I have configured my alix 2d2 running voyage 0.9.5 with two wireless<br>> > interfaces. One is in client mode (wlan0) and the other is in AP mode<br>> > (wlan1). Everything works fine but once the clients are authenticated in the<br>> > AP network they don't get an IP via DHCP and they can't ping any host on the<br>> > network.<br>> ><br>> > These are my configuration files<br>> ><br>> > /etc/network/interfaces.d/wlan0.conf<br>> ><br>> ><br>> > /etc/network/interfaces.d/wlan1.conf<br>> ><br>> ><br>> > /etc/hostapd/hostapd.wlan1.conf<br>> ><br>> ><br>> > /etc/dnsmasq.more.conf<br>> sorry, the content of these files is missing<br>> <br>> <br>> ><br>> ><br>> > So, what happens is when the client authenticates in the AP no DHCP request<br>> > is received. Just in case I am attaching here some logs<br>> if the clients have success associating the WLAN, but no broadcasts are<br>> received by the DHCP servers, the clients get no leased IP adress and<br>> for sure can not ping. Then you should check the clients if they really<br>> are configured to be DHCP clients, and if they really perform DHCP<br>> broadcasts<br>> <br>> <br>> <br>> ><br>> > iptables --list<br>> ><br>> ><br>> > tail -f /var/log/syslog (on client auth)<br>> sorry, no content visible<br>> <br>> ><br>> ><br>> > And my routing table<br>> no content visible. But as DHCP is broadcast based, it works only in one<br>> subnet (without a DHCP proxy). So routing should hardly be the cause of<br>> your prob<br>> <br>> <br>> ><br>> ><br>> > What is wrong here? :confused:<br>> Maybe you should post kind of a picture of your networks and your setup.<br>> And regarding your clients, I believe it's kind of a Linux, may be<br>> Debian. Is this the case ?<br>> <br>> <br>> ><br>> ><br>> ><br>> > --<br>> > View this message in context: http://voyage-linux.34677.n3.nabble.com/DHCP-server-not-working-using-dnsmasq-config-and-nat-sh-scripts-tp4026374.html<br>> > Sent from the Voyage Linux mailing list archive at Nabble.com.<br>> ><br>> > _______________________________________________<br>> > Voyage-linux mailing list<br>> > Voyage-linux@list.voyage.hk<br>> > http://list.voyage.hk/mailman/listinfo/voyage-linux<br>> <br></div>                                    </div></body>
</html>