Allow outgoing traffic only from one interface
I explain you quickly my project to start:
I have a server (debian 11) with a 4G SIM card and a router that also has a 4G SIM card. The server is temporarily present to supervise the 4G router, my idea is to connect the server in LAN to the router so that it retrieves the logs from the router and transmits them (via promtail) to another remote server.
The server should not depend on the 4G connection of the router but on its connection, how can I, via iptables, iproute I suppose, communicate only in LAN with the router and use only the 4G connection of the server to communicate with the outside?
Thanks !
|