port 80 out new ISP

/dev/rob0 rob0 at gmx.co.uk
Fri Aug 19 19:05:22 CEST 2005

On Friday 2005-August-19 10:55, Brent Clark wrote:
> I currently have been reading the following doc.
> http://linux-ip.net/html/adv-multi-internet.html
> and have changed my scripts accordingly.

Not quite.

> my setup is as so
> firewall:
> eth0    -> Routes traffic to old ISP
> eth1    -> Private Lan
> eth2    -> for ADSL
> Adsl modem:
> ipaddress: (external ip dynamically assigned)

This "modem" is also functioning as a NAT router? So in effect your IP (eth2) can function as an external interface?

> ## Create the table
> ip route flush table TELKOM  >>/dev/null
> ip route show table main |grep -Ev ^default\

What does this command, without the "\<newline>" and pipe, return?

>    | while read ROUTE ; do
>      ip route add table TELKOM $ROUTE
>   done
> ## Add the ADSL as route to route table 4
> ip route add default via dev eth2 table TELKOM
> >>/dev/null
> ## Add the route to table TELKOM
> ip rule add fwmark 1 table TELKOM >> /dev/null

And what do your routing rules show at this point?

> $IPT -t nat -A PREROUTING -i eth1 -t mangle -p tcp --dport 80 -j MARK
> --set-mark 1
> $IPT -t nat -A PREROUTING -i eth1 -t mangle -p tcp 
> --dport 443 -j MARK --set-mark 1
> # SNAT the Private LAN
> $IPT -t nat -A POSTROUTING -o eth0 -s -j SNAT
> --to-source
> #$IPT -t nat -A POSTROUTING -o eth2 -s 
> -j SNAT --to-source

Why is that one commented?

> $IPT -t nat -A POSTROUTING -o eth2 -s -j MASQUERADE

MASQUERADE will not work with dual routing.
    mail to this address is discarded unless "/dev/rob0"
    or "not-spam" is in Subject: header

More information about the netfilter mailing list