V
V
Vladimir Streltsov2020-03-27 15:43:01
Computer networks
Vladimir Streltsov, 2020-03-27 15:43:01

How can I NAT a non-default route table so that clients access the internet through a dedicated connection/gateway?

Hello.
There is a system where one of their network cards looks into the LAN port of the modem, which is configured as a bridge, and the second network card looks into the switch and LAN, from where clients for the Internet will come.
One (for now, there will be several later) pppoe connection to the inet0 interface rises through the bridge and the routes are added to the corresponding route table with the same name.

NAT through the default route from the main table works well, but after adding the rule ip rule add from 192.168.100.62 table inet0, the client with the address 192.168.100.62 seems to start walking through the pp connection, but halfway: pings pass, traceroutes pass, some sites (for example, Google (search, YouTube, ETC), Yandex, Facebook) work, but other sites fall on timeout.

I can not understand what I did wrong and why the Internet works selectively.

The network is run by NM, firewalld. Tried on Centos 8 and Fedora 31 systems.

# firewall-cmd --get-zone-of-interface=inet0
external

# ip rule
0: from all lookup local
32765: from 192.168.100.62 lookup inet0
32766: from all lookup main
32767: from all lookup default

# ip rst inet0
default via 100.104.128.1 dev inet0 proto static metric 20460
100.104.128.1 dev inet0 proto kernel scope link src 100.104.247.157 metric

460 Write what other logs / configs to show.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wexter, 2020-03-27
@Wexter

https://www.opennet.ru/base/net/pppoe_mtu.txt.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question