I have a router (with iptables support) with 2 WAN interfaces (wan0 and wan1) and I am trying to redirect calls of specific IPs (for ex: 8.8.8.8) over second interface (wan1) using ip tables. Traffic is coming from single LAN interface (eth0). I tried to mark the network packets like this:
iptables -t mangle -I PREROUTING -d $PUBLIC_IP -p tcp --dports 80,443 -j MARK --set-mark 0x77
and then create a rule through UI of router based on markings. But no luck.
Can this be done using only iptables?
I am sorry I am not coming from networking field so any help appreciate.
Thanks in advance!