I got three gateways:
192.168.10.1 on eth0 (default),
192.168.100.1 on eth0:0
192.168.101.1 on eth0:1
I'm trying to make my computer decide on which to use, from the request port. (request comes server-side)
exemple.com:80 -> via 192.168.10.1 to exemple.com:80
exemple.com:81 -> via 192.168.100.1 to exemple.com:80
exemple.com:82 -> via 192.168.101.1 to exemple.com:80
how should I proceed ?
thanks
You should mark the traffic with iptables first, then you can set rules to handle the traffic accordingly, something along this lines:
Of course next hop needs to handle NAT/etc and I didn't check syntax.