Re: routing_based_on_port/services

Vladimir Mitiouchev <[email protected]>
Newsgroups gmane.comp.security.linux
Message-ID <Pine.LNX.4.63.0510051443350.7754@macabre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 3 Oct 2005, [email protected] wrote:

> I just want to ask you a question.I have a linux(Secure platform) gateway server with 2 external ip address to the internet (one S/0 ADSl, second S/1 Point to Point) and one internal ip eth0 for my LAN. I need to split up the outgoing traffic.HTTP/HTTPS want to route through the ADSL and the rest of traffic (SMTP,POP3,FTP) through the Point to Point.Can i solve this with Linux iptables or whatever else. Any suggestion help..

(***Read LARTC (Linux Advanced Routing and Traffic Control***)

Mark HTTP[S] traffic with fwmark
# iptables -A FORWARD -s localnet/localmask -m mport -p tcp --dports 
80,443 
- -j MARK --set-mark 0x1

Create custom routing table and set default route on it with

# ip route add default via [ppp-gw] table [customtable]

Add a rule for routing marked packets
# ip rule add fwmark 0x1 table [customtable]

Should work, i think.

Vladimir
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1-ecc0.1.6 (GNU/Linux)

iD8DBQFDQ81gvjFIPugLvNERApElAKDMwIt4NWhBjW1ekMRA432CUZ0AkgCeMHaS
sdB/AlILY+O2y0N5oeKwWNE=
=QrT/
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.