Has anyone managed to get CoovaChilli working on OpenWrt ver 18 and up and also Ubuntu. I have put over 50 hours into this now and getting CoovaChilli 1.6 to run and allocate an IP address from the captive portal pool but there is no redirection to the RadiusDesk landing page nor is it allowing access to IP's set in 'option uamallowed' or domains set in 'option uamdomain'. 'option dhcpif' is set with wlan0 which is the wireless network and the LAN is not bridged. Firewall and routes look good. It's like CoovaChilli is just broken and beyond the scope of me fixing it. Can anyone help or add any ideas on how to fix this. Thanks
I also had to put quotes around the options vars and make sure that my radius server, DNS servers and Coova-chilli listening instance (10.19.73.1) were in the uamallowed list.
Hi all,
Has anyone managed to get CoovaChilli working on OpenWrt ver 18 and up and also Ubuntu. I have put over 50 hours into this now and getting CoovaChilli 1.6 to run and allocate an IP address from the captive portal pool but there is no redirection to the RadiusDesk landing page nor is it allowing access to IP's set in 'option uamallowed' or domains set in 'option uamdomain'. 'option dhcpif' is set with wlan0 which is the wireless network and the LAN is not bridged. Firewall and routes look good. It's like CoovaChilli is just broken and beyond the scope of me fixing it. Can anyone help or add any ideas on how to fix this. Thanks
My OpenWrt settings
Routes
lan 0.0.0.0/0 192.168.2.1 0 main
lan 192.168.2.0/24 - 0 main
(tun0) 192.168.182.0/24 - 0 main
/etc/config/firewall
config defaults
option input 'ACCEPT'
option output 'ACCEPT'
option synflood_protect '1'
option forward 'REJECT'
config include
option path '/etc/firewall.user'
config zone
option input 'ACCEPT'
option output 'ACCEPT'
option network 'lan'
option forward 'REJECT'
option name 'Lan'
option masq '1'
option mtu_fix '1'
config zone
option network 'Guest'
option input 'ACCEPT'
option name 'Guest'
option output 'ACCEPT'
option forward 'ACCEPT'
config forwarding
option dest 'Lan'
option src 'Guest'
IPTABLES
Table: Filter
Chain INPUT (Policy: ACCEPT, 0 Packets, 0 B Traffic)
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
28
2.92 KB
DROP all wlan0 * 0.0.0.0/0 0.0.0.0/0 - -
0
0 B
ACCEPT icmp tun0 * 0.0.0.0/0 192.168.182.1 - -
0
0 B
ACCEPT udp tun0 * 0.0.0.0/0 192.168.182.1 udp dpt:53 -
0
0 B
ACCEPT udp tun0 * 0.0.0.0/0 192.168.182.1 udp dpts:67:68 -
0
0 B
ACCEPT udp tun0 * 0.0.0.0/0 255.255.255.255 udp dpts:67:68 -
0
0 B
ACCEPT tcp tun0 * 0.0.0.0/0 192.168.182.1 tcp dpt:3991 -
45
5.14 KB
ACCEPT tcp tun0 * 0.0.0.0/0 192.168.182.1 tcp dpt:3990 -
56
3.98 KB
ACCEPT all lo * 0.0.0.0/0 0.0.0.0/0 - -
6.77 K
959.66 KB
input_rule all * * 0.0.0.0/0 0.0.0.0/0 - Custom input rule chain
6.50 K
912.90 KB
ACCEPT all * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED -
0
0 B
syn_flood tcp * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x02 -
274
46.76 KB
zone_Lan_input all br-lan * 0.0.0.0/0 0.0.0.0/0 - -
0
0 B
zone_Guest_input all wlan0 * 0.0.0.0/0 0.0.0.0/0 - -
0
0 B
DROP all tun0 * 0.0.0.0/0 192.168.182.1 - -
Chain FORWARD (Policy: DROP, 0 Packets, 0 B Traffic)
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
0
0 B
DROP tcp * * 0.0.0.0/0 192.168.2.1 tcp dpt:80 -
0
0 B
ACCEPT all * * 0.0.0.0/0 192.168.1.51 - -
0
0 B
ACCEPT all * * 0.0.0.0/0 192.168.2.1 - -
3.45 K
596.02 KB
DROP all * * 0.0.0.0/0 192.0.0.0/8 - -
0
0 B
DROP tcp tun0 * 0.0.0.0/0 10.1.0.1 tcp dpt:22 -
3.38 K
231.09 KB
ACCEPT all tun0 br-lan 0.0.0.0/0 0.0.0.0/0 - -
0
0 B
DROP all tun0 !br-lan 0.0.0.0/0 0.0.0.0/0 - -
51
3.06 KB
TCPMSS tcp * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 TCPMSS clamp to PMTU -
1
60 B
ACCEPT all * tun0 0.0.0.0/0 0.0.0.0/0 - -
0
0 B
ACCEPT all tun0 * 0.0.0.0/0 0.0.0.0/0 - -
0
0 B
DROP all * wlan0 0.0.0.0/0 0.0.0.0/0 - -
3.45 K
236.86 KB
DROP all wlan0 * 0.0.0.0/0 0.0.0.0/0 - -
14
1.27 KB
forwarding_rule all * * 0.0.0.0/0 0.0.0.0/0 - Custom forwarding rule chain
10
1.01 KB
ACCEPT all * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED -
0
0 B
zone_Lan_forward all br-lan * 0.0.0.0/0 0.0.0.0/0 - -
4
259 B
zone_Guest_forward all wlan0 * 0.0.0.0/0 0.0.0.0/0 - -
0
0 B
reject all * * 0.0.0.0/0 0.0.0.0/0 - -
Chain OUTPUT (Policy: ACCEPT, 0 Packets, 0 B Traffic)
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
56
3.98 KB
ACCEPT all * lo 0.0.0.0/0 0.0.0.0/0 - -
5.70 K
862.25 KB
output_rule all * * 0.0.0.0/0 0.0.0.0/0 - Custom output rule chain
5.69 K
861.35 KB
ACCEPT all * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED -
10
894 B
zone_Lan_output all * br-lan 0.0.0.0/0 0.0.0.0/0 - -
0
0 B
zone_Guest_output all * wlan0 0.0.0.0/0 0.0.0.0/0 - -
Chain forwarding_Guest_rule (1 References)
Chain zone_Guest_forward, Rule #1
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain forwarding_Lan_rule (1 References)
Chain zone_Lan_forward, Rule #1
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain forwarding_rule (1 References)
Chain FORWARD, Rule #13
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain input_Guest_rule (1 References)
Chain zone_Guest_input, Rule #1
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain input_Lan_rule (1 References)
Chain zone_Lan_input, Rule #1
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain input_rule (1 References)
Chain INPUT, Rule #9
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain output_Guest_rule (1 References)
Chain zone_Guest_output, Rule #1
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain output_Lan_rule (1 References)
Chain zone_Lan_output, Rule #1
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain output_rule (1 References)
Chain OUTPUT, Rule #2
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain reject (2 References)
Chain FORWARD, Rule #17
Chain zone_Lan_dest_REJECT, Rule #1
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
0
0 B
REJECT tcp * * 0.0.0.0/0 0.0.0.0/0 reject-with tcp-reset -
0
0 B
REJECT all * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable -
Chain syn_flood (1 References)
Chain INPUT, Rule #11
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
0
0 B
RETURN tcp * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x02 limit: avg 25/sec burst 50 -
0
0 B
DROP all * * 0.0.0.0/0 0.0.0.0/0 - -
Chain zone_Guest_dest_ACCEPT (2 References)
Chain zone_Guest_forward, Rule #4
Chain zone_Guest_output, Rule #2
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
0
0 B
ACCEPT all * wlan0 0.0.0.0/0 0.0.0.0/0 - -
Chain zone_Guest_forward (1 References)
Chain FORWARD, Rule #16
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
4
259 B
forwarding_Guest_rule all * * 0.0.0.0/0 0.0.0.0/0 - Custom Guest forwarding rule chain
4
259 B
zone_Lan_dest_ACCEPT all * * 0.0.0.0/0 0.0.0.0/0 - Zone Guest to Lan forwarding policy
0
0 B
ACCEPT all * * 0.0.0.0/0 0.0.0.0/0 ctstate DNAT Accept port forwards
0
0 B
zone_Guest_dest_ACCEPT all * * 0.0.0.0/0 0.0.0.0/0 - -
Chain zone_Guest_input (1 References)
Chain INPUT, Rule #13
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
0
0 B
input_Guest_rule all * * 0.0.0.0/0 0.0.0.0/0 - Custom Guest input rule chain
0
0 B
ACCEPT all * * 0.0.0.0/0 0.0.0.0/0 ctstate DNAT Accept port redirections
0
0 B
zone_Guest_src_ACCEPT all * * 0.0.0.0/0 0.0.0.0/0 - -
Chain zone_Guest_output (1 References)
Chain OUTPUT, Rule #5
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
0
0 B
output_Guest_rule all * * 0.0.0.0/0 0.0.0.0/0 - Custom Guest output rule chain
0
0 B
zone_Guest_dest_ACCEPT all * * 0.0.0.0/0 0.0.0.0/0 - -
Chain zone_Guest_src_ACCEPT (1 References)
Chain zone_Guest_input, Rule #3
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
0
0 B
ACCEPT all wlan0 * 0.0.0.0/0 0.0.0.0/0 ctstate NEW,UNTRACKED -
Chain zone_Lan_dest_ACCEPT (2 References)
Chain zone_Guest_forward, Rule #2
Chain zone_Lan_output, Rule #2
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
0
0 B
DROP all * br-lan 0.0.0.0/0 0.0.0.0/0 ctstate INVALID Prevent NAT leakage
14
1.15 KB
ACCEPT all * br-lan 0.0.0.0/0 0.0.0.0/0 - -
Chain zone_Lan_dest_REJECT (1 References)
Chain zone_Lan_forward, Rule #3
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
0
0 B
reject all * br-lan 0.0.0.0/0 0.0.0.0/0 - -
Chain zone_Lan_forward (1 References)
Chain FORWARD, Rule #15
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
0
0 B
forwarding_Lan_rule all * * 0.0.0.0/0 0.0.0.0/0 - Custom Lan forwarding rule chain
0
0 B
ACCEPT all * * 0.0.0.0/0 0.0.0.0/0 ctstate DNAT Accept port forwards
0
0 B
zone_Lan_dest_REJECT all * * 0.0.0.0/0 0.0.0.0/0 - -
Chain zone_Lan_input (1 References)
Chain INPUT, Rule #12
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
274
46.76 KB
input_Lan_rule all * * 0.0.0.0/0 0.0.0.0/0 - Custom Lan input rule chain
0
0 B
ACCEPT all * * 0.0.0.0/0 0.0.0.0/0 ctstate DNAT Accept port redirections
274
46.76 KB
zone_Lan_src_ACCEPT all * * 0.0.0.0/0 0.0.0.0/0 - -
Chain zone_Lan_output (1 References)
Chain OUTPUT, Rule #4
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
10
894 B
output_Lan_rule all * * 0.0.0.0/0 0.0.0.0/0 - Custom Lan output rule chain
10
894 B
zone_Lan_dest_ACCEPT all * * 0.0.0.0/0 0.0.0.0/0 - -
Chain zone_Lan_src_ACCEPT (1 References)
Chain zone_Lan_input, Rule #3
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
274
46.76 KB
ACCEPT all br-lan * 0.0.0.0/0 0.0.0.0/0 ctstate NEW,UNTRACKED -
Table: NAT
Chain PREROUTING (Policy: ACCEPT, 5444 Packets, 642.69 KB Traffic)
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
5.44 K
642.69 KB
prerouting_rule all * * 0.0.0.0/0 0.0.0.0/0 - Custom prerouting rule chain
1.16 K
345.04 KB
zone_Lan_prerouting all br-lan * 0.0.0.0/0 0.0.0.0/0 - -
2.22 K
157.96 KB
zone_Guest_prerouting all wlan0 * 0.0.0.0/0 0.0.0.0/0 - -
Chain INPUT (Policy: ACCEPT, 74 Packets, 8.42 KB Traffic)
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain OUTPUT (Policy: ACCEPT, 17 Packets, 1.40 KB Traffic)
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain POSTROUTING (Policy: ACCEPT, 7 Packets, 504 B Traffic)
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
2.05 K
139.00 KB
postrouting_rule all * * 0.0.0.0/0 0.0.0.0/0 - Custom postrouting rule chain
2.04 K
138.50 KB
zone_Lan_postrouting all * br-lan 0.0.0.0/0 0.0.0.0/0 - -
0
0 B
zone_Guest_postrouting all * wlan0 0.0.0.0/0 0.0.0.0/0 - -
Chain postrouting_Guest_rule (1 References)
Chain zone_Guest_postrouting, Rule #1
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain postrouting_Lan_rule (1 References)
Chain zone_Lan_postrouting, Rule #1
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain postrouting_rule (1 References)
Chain POSTROUTING, Rule #1
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain prerouting_Guest_rule (1 References)
Chain zone_Guest_prerouting, Rule #1
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain prerouting_Lan_rule (1 References)
Chain zone_Lan_prerouting, Rule #1
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain prerouting_rule (1 References)
Chain PREROUTING, Rule #1
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain zone_Guest_postrouting (1 References)
Chain POSTROUTING, Rule #3
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
0
0 B
postrouting_Guest_rule all * * 0.0.0.0/0 0.0.0.0/0 - Custom Guest postrouting rule chain
Chain zone_Guest_prerouting (1 References)
Chain PREROUTING, Rule #3
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
2.22 K
157.96 KB
prerouting_Guest_rule all * * 0.0.0.0/0 0.0.0.0/0 - Custom Guest prerouting rule chain
Chain zone_Lan_postrouting (1 References)
Chain POSTROUTING, Rule #2
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
2.04 K
138.50 KB
postrouting_Lan_rule all * * 0.0.0.0/0 0.0.0.0/0 - Custom Lan postrouting rule chain
2.04 K
138.50 KB
MASQUERADE all * * 0.0.0.0/0 0.0.0.0/0 - -
Chain zone_Lan_prerouting (1 References)
Chain PREROUTING, Rule #2
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
1.16 K
345.04 KB
prerouting_Lan_rule all * * 0.0.0.0/0 0.0.0.0/0 - Custom Lan prerouting rule chain
Table: Mangle
Chain PREROUTING (Policy: ACCEPT, 18162 Packets, 2.36 MB Traffic)
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain INPUT (Policy: ACCEPT, 6746 Packets, 948.07 KB Traffic)
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain FORWARD (Policy: ACCEPT, 10276 Packets, 1.06 MB Traffic)
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
118
7.08 KB
TCPMSS tcp * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 TCPMSS clamp to PMTU -
118
7.08 KB
TCPMSS tcp * br-lan 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 TCPMSS clamp to PMTU Zone Lan MTU fixing
6
360 B
TCPMSS tcp br-lan * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 TCPMSS clamp to PMTU Zone Lan MTU fixing
Chain OUTPUT (Policy: ACCEPT, 5624 Packets, 846.00 KB Traffic)
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
No rules in this chain.
Chain POSTROUTING (Policy: ACCEPT, 9006 Packets, 1.08 MB Traffic)
Pkts. Traffic Target Prot. In Out Source Destination Options Comment
Last edit: Stephen Davies 2023-07-05
I resolved this.
Added the following to /etc/chilli/ipup.sh
iptables -I POSTROUTING -t nat -o $HS_WANIF -j MASQUERADE
I also had to put quotes around the options vars and make sure that my radius server, DNS servers and Coova-chilli listening instance (10.19.73.1) were in the uamallowed list.
option uamserver "http://myradiusserver.com/landingpage.html"
option uamallowed "10.19.73.1,192.168.2.199,8.8.8.8,8.8.4.4"
option uamdomain ".myallowedsite.com"