Closed ramashishb closed 7 years ago
Sounds like eth1 is in the br-lan bridge? If so you’ll need to make the dhcpif br-lan and use the usetap option and probably also disable dnsmasq running on br-lan.
- brian
On 9/01/2017, at 3:41 PM, ramashishb notifications@github.com wrote:
Hi,
I have just setup coovachilli on my router tl-wr740n. I have followed the instructions on https://wiki.openwrt.org/doc/howto/wireless.hotspot.coova-chilli https://wiki.openwrt.org/doc/howto/wireless.hotspot.coova-chilli. Initially, it wasn't starting with the error that it was not able to generate configuration file. Later, I generated a file by hand to start it in debug foreground mode. Here are contents of my chilli.conf-
tundev="tun0" dhcpif="eth1" domain="www.mydomain" radiusserver1="www.mydomain" radiusserver2="www.mydomain" radiussecret="mysecret" uamserver="http://www.mydomain:8888/verify" uamhomepage="http://www.mydomain:8888/splash" uamsecret="mysecret" uamallowed="www.mydomain" uamdomain=".mydomain" ipup="/etc/chilli/up.sh" ipdown="/etc/chilli/down.sh" I then start chilli using chilli -fd -c chilli.conf. Chilli starts with the following output on console-
main-opt.c: 453: 0 (Debug) IPv6 disabled main-opt.c: 640: 0 (Debug) DHCP Listen: 192.168.182.1 main-opt.c: 641: 0 (Debug) UAM Listen: 192.168.182.1 garden.c: 439: 0 (Debug) Uamallowed IP address #0:128: proto=0 host=188.166.243.146 port=8888 garden.c: 472: 0 (Debug) Uamallowed [wifi.mydomain] garden.c: 439: 0 (Debug) Uamallowed IP address #1:128: proto=0 host=188.166.243.146 port=0 main-opt.c: 869: 0 (Debug) uamdomain .mydomain options.c: 446: 0 (Debug) PID 1430 saving options to /var/run/chilli.1429.cfg.bin options.c: 658: 0 (Debug) PID 1429 reloaded binary options file chilli.c: 7278: 0 (Debug) clock realtime sec 1483929202 nsec 253277276 chilli.c: 7283: 0 (Debug) clock monotonic sec 43016 nsec 708676610 tun.c: 605: 0 (Debug) TX queue length set to 100 tun.c: 1111: 0 (Debug) Running /etc/chilli/up.sh ippool.c: 338: 0 (Debug) Hashlog 8 253 256 net.c: 1279: 0 (Debug) Net SNDBUF 163840 net.c: 1282: 0 (Debug) Net RCVBUF 163840 net.c: 1337: 0 (Debug) device eth1 ifindex 3 net.c: 1353: 0 (Debug) lo address family: 17 (AF_PACKET) net.c: 1353: 0 (Debug) eth0 address family: 17 (AF_PACKET) net.c: 1353: 0 (Debug) eth1 address family: 17 (AF_PACKET) net.c: 1353: 0 (Debug) br-lan address family: 17 (AF_PACKET) net.c: 1353: 0 (Debug) wlan0 address family: 17 (AF_PACKET) net.c: 1353: 0 (Debug) lo address family: 2 (AF_INET) net.c: 1353: 0 (Debug) eth1 address family: 2 (AF_INET) net.c: 1353: 0 (Debug) br-lan address family: 2 (AF_INET) net.c: 1353: 0 (Debug) tun0 address family: 2 (AF_INET) net.c: 1353: 0 (Debug) lo address family: 10 (AF_INET6) net.c: 1353: 0 (Debug) eth1 address family: 10 (AF_INET6) net.c: 1368: 0 (Debug) address: <fe80::1aa6:f7ff:fe67:f64b%eth1>
net.c: 1353: 0 (Debug) br-lan address family: 10 (AF_INET6) net.c: 1353: 0 (Debug) br-lan address family: 10 (AF_INET6) net.c: 1353: 0 (Debug) wlan0 address family: 10 (AF_INET6) dhcp.c: 481: 0 (Debug) hash table size 64 (56) dhcp.c: 333: 0 (Debug) GARP: Replying to broadcast dhcp.c: 1169: 0 (Debug) dhcpif (eth1) IPv6 address fe80::1aa6:f7ff:fe67:f64b radius.c: 1316: 0 (Debug) RADIUS client 0.0.0.0:0 chilli.c: 7438: 0 (Debug) Waiting for client request... radius.c: 321: 0 (Debug) Allocating RADIUS packet net.c: 416: 0 (Debug) net select count: 1 net.c: 416: 0 (Debug) net select count: 2 net.c: 416: 0 (Debug) net select count: 3 net.c: 416: 0 (Debug) net select count: 4 net.c: 416: 0 (Debug) net select count: 5 net.c: 416: 0 (Debug) net select count: 6 net.c: 416: 0 (Debug) net select count: 7 net.c: 416: 0 (Debug) net select count: 8 dhcp.c: 3713: 0 (Debug) Address not found (192.168.1.1) dhcp.c: 728: 0 (Debug) DHCP newconn: 18-A6-F7-67-F6-4A chilli.c: 5137: 0 (Debug) New DHCP request from MAC=18-A6-F7-67-F6-4A chilli.c: 5140: 0 (Debug) New DHCP connection established chilli.c: 5098: 0 (Debug) New Chilli Connection dhcp.c: 3836: 0 (Debug) Not for our MAC or broadcast: 80-E6-50-03-2C-E8 dhcp.c: 3836: 0 (Debug) Not for our MAC or broadcast: 80-E6-50-03-2C-E8 dhcp.c: 3836: 0 (Debug) Not for our MAC or broadcast: 80-E6-50-03-2C-E8 dhcp.c: 3836: 0 (Debug) Not for our MAC or broadcast: 80-E6-50-03-2C-E8 dhcp.c: 3713: 0 (Debug) Address not found (192.168.1.244) dhcp.c: 728: 0 (Debug) DHCP newconn: 80-E6-50-03-2C-E8 chilli.c: 5137: 0 (Debug) New DHCP request from MAC=80-E6-50-03-2C-E8 chilli.c: 5140: 0 (Debug) New DHCP connection established chilli.c: 5098: 0 (Debug) New Chilli Connection dhcp.c: 3836: 0 (Debug) Not for our MAC or broadcast: 18-A6-F7-67-F6-4A dhcp.c: 3836: 0 (Debug) Not for our MAC or broadcast: 18-A6-F7-67-F6-4A dhcp.c: 3713: 0 (Debug) Address not found (74.125.130.125) dhcp.c: 728: 0 (Debug) DHCP newconn: 94-FB-B2-3D-BB-F0 chilli.c: 5137: 0 (Debug) New DHCP request from MAC=94-FB-B2-3D-BB-F0 chilli.c: 5140: 0 (Debug) New DHCP connection established chilli.c: 5098: 0 (Debug) New Chilli Connection chilli.c: 4896: 0 (Debug) ----> cb_dhcp_request <---- chilli.c: 4900: 0 (Debug) DHCP request for IP address 74.125.130.125 chilli.c: 865: 0 (Debug) newip 74.125.130.125 ippool.c: 456: 0 (Debug) Requesting new static ip: 74.125.130.125 ippool.c: 481: 0 (Debug) Static IP address not allowed ippool.c: 456: 0 (Debug) Requesting new dynamic ip: 74.125.130.125 chilli.c: 5027: 0 (Debug) Client MAC=94-FB-B2-3D-BB-F0 assigned IP 192.168.182.2 dhcp.c: 3978: 0 (Debug) Received packet with spoofed source! dhcp.c: 3713: 0 (Debug) Address not found (192.168.2.100) dhcp.c: 728: 0 (Debug) DHCP newconn: 18-A6-F7-67-F6-4B chilli.c: 5137: 0 (Debug) New DHCP request from MAC=18-A6-F7-67-F6-4B chilli.c: 5140: 0 (Debug) New DHCP connection established chilli.c: 5098: 0 (Debug) New Chilli Connection dhcp.c: 3836: 0 (Debug) Not for our MAC or broadcast: 94-FB-B2-3D-BB-F0 dhcp.c: 3836: 0 (Debug) Not for our MAC or broadcast: 94-FB-B2-3D-BB-F0 dhcp.c: 3978: 0 (Debug) Received packet with spoofed source! dhcp.c: 3836: 0 (Debug) Not for our MAC or broadcast: 94-FB-B2-3D-BB-F0 dhcp.c: 3978: 0 (Debug) Received packet with spoofed source! dhcp.c: 3836: 0 (Debug) Not for our MAC or broadcast: 94-FB-B2-3D-BB-F0 dhcp.c: 3978: 0 (Debug) Received packet with spoofed source! dhcp.c: 3836: 0 (Debug) Not for our MAC or broadcast: 94-FB-B2-3D-BB-F0 dhcp.c: 3978: 0 (Debug) Received packet with spoofed source! dhcp.c: 3836: 0 (Debug) Not for our MAC or broadcast: 94-FB-B2-3D-BB-F0 radius.c: 1907: 0 (Debug) Received RADIUS packet id=0 radius.c: 422: 0 (Debug) Freeing RADIUS packet radius.c: 427: 0 (Debug) RADIUS queue-out id=0 idx=0 dhcp.c: 3978: 0 (Debug) Received packet with spoofed source! dhcp.c: 3836: 0 (Debug) Not for our MAC or broadcast: 94-FB-B2-3D-BB-F0 dhcp.c: 3978: 0 (Debug) Received packet with spoofed source! dhcp.c: 3836: 0 (Debug) Not for our MAC or broadcast: 94-FB-B2-3D-BB-F0 dhcp.c: 3978: 0 (Debug) Received packet with spoofed source! dhcp.c: 3836: 0 (Debug) Not for our MAC or broadcast: 94-FB-B2-3D-BB-F0 dhcp.c: 3978: 0 (Debug) Received packet with spoofed source! dhcp.c: 3836: 0 (Debug) Not for our MAC or broadcast: 94-FB-B2-3D-BB-F0 dhcp.c: 3978: 0 (Debug) Received packet with spoofed source! chilli.c: 379: 0 (Debug) caught 18 via selfpipe chilli.c: 310: 0 (Debug) child 1434 terminated dhcp.c: 3978: 0 (Debug) Received packet with spoofed source! dhcp.c: 3978: 0 (Debug) Received packet with spoofed source! Output of ifconfig
root@OpenWrt:~# ifconfig br-lan Link encap:Ethernet HWaddr 18:A6:F7:67:F6:4A
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::1aa6:f7ff:fe67:f64a/64 Scope:Link inet6 addr: fde8:f72c:ef87::1/60 Scope:Global UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:148705 errors:0 dropped:0 overruns:0 frame:0 TX packets:136879 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:30037042 (28.6 MiB) TX bytes:41520533 (39.5 MiB)eth0 Link encap:Ethernet HWaddr 18:A6:F7:67:F6:4A
UP BROADCAST MTU:1500 Metric:1 RX packets:9033 errors:0 dropped:0 overruns:0 frame:0 TX packets:5891 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1449912 (1.3 MiB) TX bytes:2395066 (2.2 MiB) Interrupt:5eth1 Link encap:Ethernet HWaddr 18:A6:F7:67:F6:4B
inet addr:192.168.2.100 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::1aa6:f7ff:fe67:f64b/64 Scope:Link UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1 RX packets:43685 errors:0 dropped:0 overruns:0 frame:0 TX packets:42970 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:16017105 (15.2 MiB) TX bytes:24167833 (23.0 MiB) Interrupt:4lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:60648 errors:0 dropped:0 overruns:0 frame:0 TX packets:60648 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:4368171 (4.1 MiB) TX bytes:4368171 (4.1 MiB)tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.182.1 P-t-P:192.168.182.1 Mask:255.255.255.0 UP POINTOPOINT RUNNING MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)wlan0 Link encap:Ethernet HWaddr 18:A6:F7:67:F6:4A
inet6 addr: fe80::1aa6:f7ff:fe67:f64a/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:140739 errors:0 dropped:0 overruns:0 frame:0 TX packets:131209 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:30822560 (29.3 MiB) TX bytes:42819493 (40.8 MiB) However, when I connect to the router using LAN I get the ip 192.168.1.138 and am able to access internet without having to go through the captive portal. Any idea, whats wrong here?— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/coova/coova-chilli/issues/334, or mute the thread https://github.com/notifications/unsubscribe-auth/AGTfh82Yag_qvCkbo1SclYhzjABi_ercks5rQZ5NgaJpZM4Ld5EJ.
Thanks for the reply. I remember setting dhcpif to br-lan, but that too didn't work. I missed out on usetap option as I am not familiar with it. Could you please tell me how to use the usetap option and disable dnsmasq on br-lan? Also, does usetap need any other kernel module apart from kmod-tun?
I can remove eth1 from br-lan bridge if that is simpler. Could you please let me know? On a related note, if bridge was the problem setting dhcpif to wlan0 should work, isn't it? That too didn't.
Thanks Ramashish
Hi @ramashishb,
You can do it using brctl
!
The problem you have is that dnsmasq is running on br-lan
, and it's responding to new client from WiFi too. So to unslave the wlan0
interface from the br-lan
you can follow next example :
root@OpenWrt:/# brctl show
bridge name bridge id STP enabled interfaces
br-lan 7fff.525400123456 no eth0
wlan0
root@OpenWrt:/# brctl delif br-lan wlan0
Then try again, you should get an IPv4 address in the 192.168.182.X range.
Thanks @gbaligh for telling about brctl
. I did same from the Luci UI and it started working. But thanks for your help :)
Hi,
I have just setup coovachilli on my router tl-wr740n on OpenWRT 15.05. I have followed the instructions on https://wiki.openwrt.org/doc/howto/wireless.hotspot.coova-chilli. Initially, it wasn't starting with the error that it was not able to generate configuration file. Later, I generated a file by hand to start it in debug foreground mode. Here are contents of my chilli.conf-
mydomain is just a placeholder, the config actually points to a valid domain. I then start chilli using
chilli -fd -c chilli.conf
. Chilli starts with the following output on console-Output of ifconfig
However, when I connect to the router on LAN port I get the ip 192.168.1.138 and am able to access internet without having to go through the captive portal. The same happens when I setup dhcpif=wlan0. Any idea, whats wrong here? Appreciate any help.