Portal Captive dont work with some ISP but with others works fine

I install Coovachilli in my router and works well with 3 ISP but with starlink fail.

When connect a device in the wifi controlled by Coovachilli gain internet access intermediately without autorization.

But, when I add an extra router between Starlink router and my openwrt router all works fine.

Any ideas?

I appreciate any help

Switch to opennds.

I use coovachilli becouse have a traffic shaping utility and opennds don´t.

The problem maybe is in the OSI layer 2, becouse with a simple routing the problem was gone.

Can I simulate a router inside my physical router?

Thanks in advance

What is the subnet of your Starlink router's lan (to which the OpenWrt device is connected)? What is the subnet of the OpenWrt network(s) -- including both the lan and the other upstream networks (if you're using multiple wans at a time).

Are you using multiple wans? If so, please show a diagram of your network topology.

There's the nft-qos package, but i works independantly of the captive portal.

Thanks @psherman ,

The starlink router only have a one subnet and is not posssible change it, 192.168.1.1/24, and his internal DHCP server has the same subnet. I have my OpenWrt router configured with DHCP client WAN (I tryed with static IP without success).
In my OpenWrt I changed several subnets for the clients but doesn´t solve the problem, the coovachilli default is 10.0.1.1/24.

I my OpenWrt only used one WAN, and configure in coovachilli as internet interface, I have a bridge lan ports with WiFi as usual.
Coova-Dont work

In the second scenario, what is the lan subnet of the intermediate router?

And on your OpenWrt router...

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

Thanks @psherman ,

In the second scenario I have tried several subnets and they have all worked perfectly. I think that's not the problem, but I'm not sure.

I tryed with various Openwrt versions, 19, 21 and 22 without success.

ubus call system board

{
	"kernel": "5.10.201",
	"hostname": "e-Nuup",
	"system": "MediaTek MT7621 ver:1 eco:3",
	"model": "Linksys E5600",
	"board_name": "linksys,e5600",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "22.03.6",
		"revision": "r20265-f85a79bcb4",
		"target": "ramips/mt7621",
		"description": "OpenWrt 22.03.6 r20265-f85a79bcb4"
	}
}

cat /etc/config/network
(I use the nuup interface for router admin with a luci mod)

config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd46:d325:2dd4::/48'
	option packet_steering '1'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'lan1'
	list ports 'lan2'
	list ports 'lan3'
	list ports 'lan4'

config device
	option name 'lan1'

config device
	option name 'lan2'

config device
	option name 'lan3'

config device
	option name 'lan4'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '11.1.0.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config device
	option name 'wan'

config interface 'wan'
	option device 'wan'
	option dns '8.8.8.8'
	option proto 'static'
	option ipaddr '192.168.99.50'
	option gateway '192.168.99.1'
	option netmask '255.255.255.0'

config interface 'wan6'
	option device 'wan'
	option proto 'dhcpv6'

config device 'nuup_dev'
	option type 'bridge'
	option name 'br-nuup'

config interface 'nuup'
	option proto 'static'
	option device 'br-nuup'
	option ipaddr '10.5.0.1'
	option netmask '255.255.255.0'

cat /etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option path '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
	option band '2g'
	option htmode 'HT20'
	option country 'CO'
	option txpower '20'
	option cell_density '1'
	option disabled '0'
	option channel '11'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option encryption 'none'
	option hidden '0'
	option ssid 'Compra_WiFi_Remote'

config wifi-device 'radio1'
	option type 'mac80211'
	option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0'
	option channel '36'
	option band '5g'
	option htmode 'VHT80'
	option disabled '1'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'

config wifi-iface 'nuup'
	option device 'radio0'
	option mode 'ap'
	option network 'nuup'
	option ssid 'xxxxx'
	option encryption 'psk2'
	option key 'xxxxxxxxxx'

cat /etc/config/dhcp
(I tryed with DHCP client without success, now I have a WAN static IP )

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option cachesize '1000'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'
	option ednspacket_max '1232'
	option filter_aaaa '0'
	option filter_a '0'

config dhcp 'lan'
	option interface 'lan'
	option start '10'
	option limit '250'
	option leasetime '8h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	option ra_slaac '1'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

config dhcp 'nuup'
	option interface 'nuup'
	option start '100'
	option limit '150'
	option leasetime '3h'
	option netmask '255.255.255.0'

cat /etc/config/firewall
( I have open all WAN traffic for admin and tests but I changed without success)

config defaults
	option syn_flood	1
	option input		ACCEPT
	option output		ACCEPT
	option forward		ACCEPT
# Uncomment this line to disable ipv6 rules
#	option disable_ipv6	1

config zone
	option name		lan
	list   network		'lan'
	option input		ACCEPT
	option output		ACCEPT
	option forward		ACCEPT

config zone
	option name		wan
	list   network		'wan'
	list   network		'wan6'
	option input		ACCEPT
	option output		ACCEPT
	option forward		ACCEPT
	option masq		1
	option mtu_fix		1

config forwarding
	option src		lan
	option dest		wan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
	option name		Allow-DHCP-Renew
	option src		wan
	option proto		udp
	option dest_port	68
	option target		ACCEPT
	option family		ipv4

# Allow IPv4 ping
config rule
	option name		Allow-Ping
	option src		wan
	option proto		icmp
	option icmp_type	echo-request
	option family		ipv4
	option target		ACCEPT

config rule
	option name		Allow-IGMP
	option src		wan
	option proto		igmp
	option family		ipv4
	option target		ACCEPT

# Allow DHCPv6 replies
# see https://github.com/openwrt/openwrt/issues/5066
config rule
	option name		Allow-DHCPv6
	option src		wan
	option proto		udp
	option dest_port	546
	option family		ipv6
	option target		ACCEPT

config rule
	option name		Allow-MLD
	option src		wan
	option proto		icmp
	option src_ip		fe80::/10
	list icmp_type		'130/0'
	list icmp_type		'131/0'
	list icmp_type		'132/0'
	list icmp_type		'143/0'
	option family		ipv6
	option target		ACCEPT

# Allow essential incoming IPv6 ICMP traffic
config rule
	option name		Allow-ICMPv6-Input
	option src		wan
	option proto	icmp
	list icmp_type		echo-request
	list icmp_type		echo-reply
	list icmp_type		destination-unreachable
	list icmp_type		packet-too-big
	list icmp_type		time-exceeded
	list icmp_type		bad-header
	list icmp_type		unknown-header-type
	list icmp_type		router-solicitation
	list icmp_type		neighbour-solicitation
	list icmp_type		router-advertisement
	list icmp_type		neighbour-advertisement
	option limit		1000/sec
	option family		ipv6
	option target		ACCEPT

# Allow essential forwarded IPv6 ICMP traffic
config rule
	option name		Allow-ICMPv6-Forward
	option src		wan
	option dest		*
	option proto		icmp
	list icmp_type		echo-request
	list icmp_type		echo-reply
	list icmp_type		destination-unreachable
	list icmp_type		packet-too-big
	list icmp_type		time-exceeded
	list icmp_type		bad-header
	list icmp_type		unknown-header-type
	option limit		1000/sec
	option family		ipv6
	option target		ACCEPT

config rule
	option name		Allow-IPSec-ESP
	option src		wan
	option dest		lan
	option proto		esp
	option target		ACCEPT

config rule
	option name		Allow-ISAKMP
	option src		wan
	option dest		lan
	option dest_port	500
	option proto		udp
	option target		ACCEPT

# allow interoperability with traceroute classic
# note that traceroute uses a fixed port range, and depends on getting
# back ICMP Unreachables.  if we're operating in DROP mode, it won't
# work so we explicitly REJECT packets on these ports.
config rule
	option name		Support-UDP-Traceroute
	option src		wan
	option dest_port	33434:33689
	option proto		udp
	option family		ipv4
	option target		REJECT
	option enabled		false

# include a file with users custom iptables rules
config include
	option path /etc/firewall.user


### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
#	option src		lan
#	option src_ip	192.168.45.2
#	option dest		wan
#	option proto	tcp
#	option target	REJECT

# block a specific mac on wan

All of these versions are EOL and unsupported. You should be using 23.05:
https://firmware-selector.openwrt.org/?version=23.05.4&target=ramips%2Fmt7621&id=linksys_e5600

The lan address here is wrong -- very wrong:

You need to stick with RFC1918 addresses. Fix that first.

Then...

Didn't you say you needed to use DHCP to connect to the Starlink router?

The DHCP server is invalid:

With a start value of 10, your limit (which is the size of the DHCP pool) must be <=245.

Remove the netmask line below:

This is configured incorrectly... possibly dangerously so in some situations:

input and forward should be set to REJECT.

Similarly for this:

What is the LuCI Mod you're talking about?
If you're using this as your admin interface, it should be added to the lan firewall zone and/or put into a new zone with input = accept.

@psherman ,

Thanks for your recommendations and I'm going to modify everything you say, but I don't think it will solve the problem, will it?

I don't know if it will solve the problem, but the lan address alone could have been causing issues.

Fix all those things first and see what happens.

@psherman, Thanks a lot, I will try and post the result.

Who told you that?
In opennds you can set upload and download rate limits both globally and per client.

@bluewavenet , Maybe you haven't read their documentation.

https://opennds.readthedocs.io/en/stable/traffic.html#traffic-shaping

Clearly they say:
If a fixed ceiling data rate is required, third party traffic shaping packages can be used in place of the built in openNDS Rate Quota Thresholds.

I need a fixed bandwidth for each device and coovachilli has it.

Regards

I wrote their documentation.

Perhaps you have not read it:

Data Rate Quotas are ideal for allowing opening of web pages and emails etc in the fastest way possible, yet preventing an individual client from monopolizing all the available bandwidth by streaming or transferring large files.

In addition:

Fair Usage Policy Throttle Rate

If Volume quota is set, an upload/download throttle rate can be configured

Don't cherry pick a paragraph out of context to support your point of view. Read the full section of the documentation:
https://opennds.readthedocs.io/en/stable/traffic.html#data-quotas-and-traffic-shaping

Your issue here is due most likely to the fact that coova-chilli has not had a major release since 2016 and has now been largely unmaintained for nearly a decade.
Things have moved on dramatically, eg Captive portal detection in user devices has matured significantly, most operating systems have moved from iptables as a default to nftables (including OpenWrt), ipv6 is becoming more common, plus many other differences.

Yes, coova-chilli can be made to work, but it takes a considerable amount of inside knowledge and numerous dirty hacks to make it work.

Your problem is not really an OpenWrt problem. You should take it up with the "coova-chilli community" if you can get anyone to respond. Join the list of 191 unresolved issues.

2 Likes

That's going to sting ...

This github issue makes interesting reading:

Excellent! I have some questions!

I read the entire chapter on quotas and traffic shaping and I never wanted to misinterpret it, but I think the text at the end that mentions the need to use additional packages confuses the reader, or at least me.

You are right, I have used coovachilli for years, but it is time to change

I like to learn and correct my mistakes, so I like it more than hurting, greetings

1 Like

Since I'm lucky that you answered, I started working on Opennds over the weekend but I can't set a maximum bandwidth to the connected clients, neither in uploads nor in downloads.

This is my configuration:

root@e-Nuup:~# uci show opennds
opennds.@opennds[0]=opennds
opennds.@opennds[0].faskey='3ea07ca3ba62ee634e95409134c4742e172975c8dfd9b9d56679432321ad23e8'
opennds.@opennds[0].login_option_enabled='3'
opennds.@opennds[0].themespec_path='/usr/lib/opennds/theme_voucher.sh'
opennds.@opennds[0].maxclients='200'
opennds.@opennds[0].preauthidletimeout='10'
opennds.@opennds[0].authidletimeout='1440'
opennds.@opennds[0].uploadrate='3000'
opennds.@opennds[0].downloadrate='5000'
opennds.@opennds[0].upload_bucket_ratio='1'
opennds.@opennds[0].download_bucket_ratio='5'
opennds.@opennds[0].max_download_bucket_size='50'
opennds.@opennds[0].max_upload_bucket_size='50'
opennds.@opennds[0].download_unrestricted_bursting='0'
opennds.@opennds[0].upload_unrestricted_bursting='0'
opennds.@opennds[0].ratecheckwindow='3'

What am I doing wrong if I want to set a limit of 5Mbps on downloads and 3Mbps on uploads per client?

Note: I set in the voucher:

ownload_rate="0"
upload_quota="0"

Thank you very much for your help!