We're currently trying to route all packets from our guest vlan's (eth1.251) subnet trough a wireguard tunnel into the internet. To accomplish this we're using policy based routing with a rule to use the routing table 10 when the traffic is comming from our guest subnet:
32765: from 10.251.0.0/16 lookup 10
In routing table 10 we're creating a default route towards our tunnel interface:
default dev wg1 scope link
All of our clients in our guest network are able to reache the internet through the wireguard tunnel which is expected, however the client's cannot reach the gateway for the guest network (10.251.0.1)
. TCPDump shows that the ICMP echo reply is routed back trough the wg1
interface to our tunnel endpoint, which is obviously not intended. A quick solution for this is to add the scope link route for the eth1.251
guest vlan interface to the routing table 10
:
default dev wg1 scope link
10.251.0.0/16 dev eth1.251 proto kernel scope link
Now the client can reach the router interface and it services.
On this router is another interface eth1 with the subnet 192.168.0.1/16
. When we now delete our newly added 10.251.0.0/16
route in table 10
we cannot reach the routers interface on 10.251.0.1
anymore, however we're still able to reach the interface 192.168.0.1
from a client on the 10.251.0.0/16
subnet. The clients (e.g 192.168.0.2
) behind the router in the 192.168.0.0/16
subnet aren't rechable from 10.251.0.0/16
.
Main Question: Why can we reach the 192.168.0.1
interface ip on our router without an explicit routing table entry, but not the 10.251.0.1
interface ip from our clients in the guest 10.251.0.0/16
subnet?
Here's an overview of the network structure. I think this helps to unterstand our setup.