0

I have setup a wireless access point with hostapd, I'm using dnsmasq for dhcp and nodogsplash as a captive portal. At initial setup, everything worked as it should. After a few days that I'm testing it again, when the client is authenticated, nodogsplash reports the client as authenticated, but when I try to access the Internet through the client I can't. If I do it without nodogsplash, by adding this rule manually:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

the client gets Internet access.

I haven't changed anything in the configuration file or the captive portal page.

I enabled the most verbose mode in the nodogsplash output and this is the part where the client is authenticated:

[5][Thu Jun 18 12:44:19 2020][2075](src/fw_iptables.c:839) Authenticating 10.0.10.160 64:cc:2e:d6:a5:a4
[7][Thu Jun 18 12:44:19 2020][2075](src/util.c:90) Executing command: iptables --wait -t mangle -A ndsOUT -s 10.0.10.160 -m mac --mac-source 64:cc:2e:d6:a5:a4 -j MARK --or-mark 0x30000 
[7][Thu Jun 18 12:44:19 2020][2075](src/util.c:93) Setting default SIGCHLD handler SIG_DFL
[7][Thu Jun 18 12:44:19 2020][2075](src/util.c:90) Executing command: iptables --wait -t mangle -A ndsINC -d 10.0.10.160 -j MARK --or-mark 0x30000
[7][Thu Jun 18 12:44:19 2020][2075](src/util.c:93) Setting default SIGCHLD handler SIG_DFL
[7][Thu Jun 18 12:44:19 2020][2075](src/util.c:90) Executing command: iptables --wait -t mangle -A ndsINC -d 10.0.10.160 -j ACCEPT
[7][Thu Jun 18 12:44:19 2020][2075](src/util.c:93) Setting default SIGCHLD handler SIG_DFL 
[7][Thu Jun 18 12:44:19 2020][2075](src/auth.c:288) Unlocking client list
[7][Thu Jun 18 12:44:19 2020][2075](src/auth.c:288) Client list unlocked
[5][Thu Jun 18 12:44:19 2020][2075](src/http_microhttpd.c:459) Client [64:cc:2e:d6:a5:a4, 10.0.10.160] authenticated
[7][Thu Jun 18 12:44:23 2020][2075](src/http_microhttpd.c:317) access: GET /nodogsplash_auth/ 
[7][Thu Jun 18 12:44:23 2020][20751(src/main.c:97) SIGCHLD handler: Trying to reap a child
[7][Thu Jun 18 12:44:23 2020][20751(src/main.c:103) SIGCHLD handler: waitpid(): No child exists now. 
[7][Thu Jun 18 12:44:23 2020][2075](src/http_microhttpd.c:317) access: GET /splash.css
[7][Thu Jun 18 12:44:23 2020][2075](src/main.c:97) SIGCHLD handler: Trying to reap a child
[7][Thu Jun 18 12:44:23 2020][2075](src/main.c:103) SIGCHLD handler: waitpid(): No child exists now.

I don't know what is the deal with SIGCHLD, but other than that it seems to not report any problems.

Since nothing changed in the configuration of the tools I'm using, this probably comes from some change in the underlying system (Kali Linux). Any ideas how to troubleshoot this?

UPDATE 1

By examining traffic with tcpdump on both interfaces, i.e. iface of the access point (wlan0) and the one with Internet access (eth0), the packets are not dropped. So I'm guessing, the client has no Internet access because the replies are not sent back from the Kali machine. Again, I haven't made any changes in the way I setup the routing table. I assign IP and netmask to the wlan0 interface:

ifconfig wlan0 up 10.0.10.1 netmask 255.255.255.0

and setup the route:

route add -net 10.0.10.0 netmask 255.255.255.0 gw 10.0.10.1

I need to find out why are the replies not sent back.

1 Answer 1

0

For nodogsplash to work, NAT must be in place. So before running nodogsplash, this iptables rule must be added:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .