Home Page › Forums › Network Management › ZeroShell › [HOWTO] Virtual servers and multiwan port forwarding problem › Reply To: [HOWTO] Virtual servers and multiwan port forwarding problem
That doesn’t worked for me. I have 4 WAN ports directly at the zeroshell and when i tried to do a telnet on the VPN port the answer has had the correct SOURCE IP (the same like i telneted to) but it was send out on another WAN port.
Maybe this can work but i think my provider dropped this packets because it didn’t come from the ip he gave to me.
So to be sure that the traffic will go through the correct WAN i have to use this command:
iptables -t mangle -I PREROUTING 2 -i ppp3 -m state --state NEW -j MARK --set-mark 0x64
now every new connection coming in from ppp3 will be set to the mark 0x64 which was set (from zeroshell) with the ip tool to:
root@zeroshell root> ip rule
32762: from all fwmark 0x64 lookup 100
and when you look to the routing table for the table 100:
root@zeroshell root> ip route show table 100
default via X.Y.Z.200 dev ppp3
you see the connection tracked as 0x64 will go through the outgoing interface ppp3 and now i can connect from outside.