Gateway has internet connection, but clients using it as the gateway do not

I have a main router (192.168.1.1) with a connection to ISP (A). It shares this connection to multiple APs.

Now my new ISP (B) added the connection on a different spot in the building. I added a gateway (192.168.1.9) on that spot, keeping the main router the same. This gateway has a wired connection to the router/modem of ISP (B).
I have disabled dnsmasq, odhcp and firewall on the gateway.

When I configure a client to use this gateway for internet connection, it cannot reach the outside world. Whereas the gateway itself can do ping and traceroute from LUCI. What can be wrong?

output of uci export network of the gateway:

package network

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 'fdec:ed55:765e::/48'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth1.1'

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

config interface 'wan'
	option device 'eth0.2'
	option proto 'dhcp'

config interface 'wan6'
	option device 'eth0.2'
	option proto 'dhcpv6'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '1 2 3 4 0t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '5 6t' 

output of traceroute 8.8.8.8 on client device:

[tos@localhost ~]$ traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
 1  _gateway (192.168.1.9)  8.423 ms  11.143 ms  12.676 ms
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  * * *
 9  * * *
10  * * *
11  * * *
12  * * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *

There is subnet overlap. Both lan and wan have 192.168.1.X
Move lan to 192.168.2.1/24.
Also dnsmasq, dhcp, and firewall are needed.

lan has 192.168.1.X
wan has 192.168.178.X
that is no overlap, right?

Firewall implements the masquerade function which is essential to route from an (IPv4) LAN to an ISP.

I guess you are somehow setting some of the .1.0 network endpoints to use .1 as their gateway to the Internet and others use .9?

1 Like

Okay, I'll enable firewall, odhcp and dnsmasq.

Yes, default the gateway in the network is 192.168.1.1, but on one device I added the custom gateway 192.168.1.9

Enabling firewall did the trick! I thought I had tested that before, but apparently not good enough :wink:

Thanks for both your help! And sorry for not investigating enough myself.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.