Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Open
samueljaydan opened this issue May 16, 2024 · 0 comments

Comments

@samueljaydan
Copy link

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)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant