coova / coova-chilli

CoovaChilli is an open-source software access controller for captive portal hotspots.
Other
518 stars 260 forks source link

How to use dnsmasq for dhcp, instead chilli itself #306

Open reinerotto opened 7 years ago

reinerotto commented 7 years ago

Is it possible to use dnsmasq, to issue IPs instead of coova-chlli itself ? There was a similar question here, https://coova.github.io/mail-archive/chilli/2010-March/001228.html without final solution, some messing around with dhcpgateway dhcpgatewayport dhcprelayagent In fact, I can reproduce the issue mentioned in the post from above, (both dnsmasq and coova issue an IP, but different ones). May be, in the meantime somebody solved the problem :-)

nzamps commented 7 years ago

You could run chilli in Layer3 mode with dnsmasq.

heruan commented 7 years ago

How to use an external DHCP relay without switching to Layer 3 mode?

I set dhcpgateway but I get both the relay and CoovaChilli to respond to DHCP requests: shouldn't CoovaChilli stop to provide addresses if dhcpgatway is set?

kishangondaliya commented 7 years ago

Working on same type of scenario.

There are two routers running on openWRT.

config chilli 'wlan1' option dhcpif 'wlan1' option tundev 'tun1' option pidfile '/var/run/chilli-wlan1.pid'

option net '192.168.181.0/24' (commented to use external dhcp)

    option uamserver 'http://192.168.17.236:4990/www/login.chi'
    option uamhomepage 'http://192.168.17.236:3990/www/coova.html'
    option uamsecret 'change-me'
    option uamlisten '192.168.17.236'
    option uamport '3990'
    option uamuiport '4990'
    option defsessiontimeout '600'
    option dns1 '208.67.222.222'
    option dns2 '208.67.222.220'
    option radiusserver1 '127.0.0.1'
    option radiusauthport '1812'
    option radiusacctport '1813'
    option radiussecret 'testing123'
    option ipup '/etc/chilli/up.sh'
    option ipdown '/etc/chilli/down.sh'
    option wwwdir '/etc/chilli/www'
    option wwwbin '/etc/chilli/wwwsh'
    option localusers '/etc/chilli/localusers'
    option dhcpgateway '192.168.17.1'
    option dhcplisten '192.168.17.235'
    option dhcprelayagent '192.168.17.235'

Here, I have given dhcpgateway 192.168.17.1 to use external dhcp of Router1, dhcprelayagent 192.168.17.235 as it is Router2's WAN port.

When I connect any wireless client to router2's wlan1, device gets IP from Router1's DHCP server, but no pop up or any redirection works. Can anybody have light on this, as I could not find anything related to this in any of the forum.

ObaidAshraf commented 7 years ago

I am having the same issue with coova chilli 1.4. I used the same config except for the network addresses. Clients are getting the IP but fail to redirect. Even clients cannot ping to their gateway address. Anyone have any solution for this issue??

cschnatz commented 5 years ago

I do have the same problem like @heruan mentioned. Both chilli and external dhcp are replying to the dhcp requests. Client gets an ip from external server but chilli assumes the the client has an other ip and drops any packets coming from that client.

This is also mentioned here: https://coova.github.io/mail-archive/chilli/2014-March/002620.html

Anyone a good idea how to solve this or could it be a bug in coova itself?