Network Routing
Thom Paine
painethom at gmail.com
Tue Apr 14 17:03:30 UTC 2009
> /sbin/iptables -t nat --flush
> /sbin/iptables -t nat -A POSTROUTING -o eth0 -s 192.168.2.0/24 -d 0/0
> -j MASQUERADE
>
> where 192.168.2.0/24 should match your subnet address
>
> this works for me, I'm not including the other rules to choke ports.
>
> -- gary
Well I have a program that sets up the rest of my rules already. I
think I need to add a special case for this one website that I need to
force out the eth2 interface. So I think I need to add that to the
very end.
I need to be able to hit 142.46.226.26 on eth2. The website associated
to this is https://one-pages.on.ca.
I have the route statement on the server.
[root at mail root]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
tlsb.tls.one-ma 142.47.61.53 255.255.255.255 UGH 0 0 0 eth2
10.250.223.148 142.47.61.53 255.255.255.255 UGH 0 0 0 eth2
tlsb.tls.one-ma 142.47.61.53 255.255.255.255 UGH 0 0 0 eth2
10.250.192.92 142.47.61.53 255.255.255.255 UGH 0 0 0 eth2
tlsa.tls.one-ma 142.47.61.53 255.255.255.255 UGH 0 0 0 eth2
tlsa.tls.one-ma 142.47.61.53 255.255.255.255 UGH 0 0 0 eth2
webmail.one-mai 142.47.61.53 255.255.255.255 UGH 0 0 0 eth2
gwa.gw.one-mail 142.47.61.53 255.255.255.255 UGH 0 0 0 eth2
gwb.gw.one-mail 142.47.61.53 255.255.255.255 UGH 0 0 0 eth2
142.46.226.26 142.47.61.53 255.255.255.255 UGH 0 0 0 eth2
ptr.ssha.ca 142.47.61.53 255.255.255.255 UGH 0 0 0 eth2
10.250.223.109 142.47.61.53 255.255.255.255 UGH 0 0 0 eth2
142.47.61.52 * 255.255.255.252 U 0 0 0 eth2
209.239.18.192 * 255.255.255.192 U 0 0 0 eth1
10.10.10.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth2
default gw.ch1.cable.ex 0.0.0.0 UG 0 0 0 eth1
Ultimately I need to add an LDAP entry to the end users address book,
but I can start with them browsing the address book online start.
Basically I want to force any traffic destined to 142.46.226.26 out
eth2 all the time. There will never be a situation I need to hit that
site from the public internet.
Thanks.
--
-=/>Thom
More information about the fedora-list
mailing list