Suppose you have a Linux machine doing IP forwarding (net.ipv4.ip_forward=1). Depending on the incoming traffic, you might want to forward the packets to different gateways. With just one gateway, you can simply add (or replace) the default gateway:ip route add default via x.x.x.x If you want to set a default gateway for a specific (incoming)… Continue reading Multiple default gateways on Linux
Tag: gateway
A gateway to forward all traffic to a remote VPN server
Suppose you’ve setup a VM and configured it as a site-to-site VPN with OpenVPN, using iroute and staticclients. You are using this VM as a default gateway for other VMs and now want to forward all traffic from the VMs not through the default gateway‘s adapter, but through the VPN tunnel. Why would you want… Continue reading A gateway to forward all traffic to a remote VPN server