ansible-role-firewall icon indicating copy to clipboard operation
ansible-role-firewall copied to clipboard

Being able to pass traffic through the wan in the table marked with a different source IP address.

Open samueljaydan opened this issue 9 months ago • 0 comments

There are 2 WAN interfaces.

WAN1 => fwmark 1 WAN2 => fwmark 2

lo998 has 2 different IP addresses. 127.0.88.1 will be used for WAN1, and 127.0.88.2 will be used for WAN2.

WAN1 => gateway => 1010.12.1 WAN1 => ip address => 10.10.12.254

WAN2 => gateway => 192.168.1.1 WAN2 => ip address => 192.168.1.3

When I run "ping -I 127.0.88.1 8.8.8.8", I want it to go through WAN1, and when I run "ping -I 127.0.88.2 8.8.8.8", I want it to go through WAN2. What should be the necessary iptables rules for this?

lo:998:0: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.88.1 netmask 255.255.255.255 loop txqueuelen 1000 (Local Loopback)

lo:998:1: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.88.2 netmask 255.255.255.255 loop txqueuelen 1000 (Local Loopback)

samueljaydan avatar May 16 '24 09:05 samueljaydan