oldwizard
9th January 2012, 01:27 AM
I can get NAT to work or answering both WAN IP's to respond - but not both.
The working NAT:
iptables-save
# Generated by iptables-save v1.4.10 on Sun Jan 8 19:24:17 2012
*nat
:PREROUTING ACCEPT [394062:44092627]
:INPUT ACCEPT [114373:10505349]
:OUTPUT ACCEPT [400036:29876645]
:POSTROUTING ACCEPT [125470:8505520]
-A POSTROUTING -o p3p1 -j MASQUERADE
COMMIT
# Completed on Sun Jan 8 19:24:17 2012
# Generated by iptables-save v1.4.10 on Sun Jan 8 19:24:17 2012
*filter
:INPUT ACCEPT [1962370:701764859]
:FORWARD ACCEPT [25783:4234443]
:OUTPUT ACCEPT [1389145:546775126]
-A FORWARD -i p3p1 -o p8p1 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i p8p1 -o p3p1 -j ACCEPT
COMMIT
# Completed on Sun Jan 8 19:24:17 2012
The working dual WANs
ip route add 10.10.10.144/29 dev p3p1 src 10.10.10.145 table att
ip route add default via 10.10.10.150 table att
ip route add 172.16.10.0/24 dev p4p1 src 172.16.10.144 table t1
ip route add default via 172.16.10.1 table t1
ip rule add from 10.10.10.145 table att
ip rule add from 172.16.10.144 table t1
ip route add default scope global nexthop via 10.10.10.150 dev p3p1 weight 1 nexthop via 172.16.10.1 dev p4p1 weight 4
How do I combine them into both working?
The working NAT:
iptables-save
# Generated by iptables-save v1.4.10 on Sun Jan 8 19:24:17 2012
*nat
:PREROUTING ACCEPT [394062:44092627]
:INPUT ACCEPT [114373:10505349]
:OUTPUT ACCEPT [400036:29876645]
:POSTROUTING ACCEPT [125470:8505520]
-A POSTROUTING -o p3p1 -j MASQUERADE
COMMIT
# Completed on Sun Jan 8 19:24:17 2012
# Generated by iptables-save v1.4.10 on Sun Jan 8 19:24:17 2012
*filter
:INPUT ACCEPT [1962370:701764859]
:FORWARD ACCEPT [25783:4234443]
:OUTPUT ACCEPT [1389145:546775126]
-A FORWARD -i p3p1 -o p8p1 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i p8p1 -o p3p1 -j ACCEPT
COMMIT
# Completed on Sun Jan 8 19:24:17 2012
The working dual WANs
ip route add 10.10.10.144/29 dev p3p1 src 10.10.10.145 table att
ip route add default via 10.10.10.150 table att
ip route add 172.16.10.0/24 dev p4p1 src 172.16.10.144 table t1
ip route add default via 172.16.10.1 table t1
ip rule add from 10.10.10.145 table att
ip rule add from 172.16.10.144 table t1
ip route add default scope global nexthop via 10.10.10.150 dev p3p1 weight 1 nexthop via 172.16.10.1 dev p4p1 weight 4
How do I combine them into both working?