From: "Simon Garner" <sgarner@expio.co.nz>
To: netfilter@lists.netfilter.org
Subject: NAT with two Internet links
Date: Thu, 16 Oct 2003 19:37:31 +1300 [thread overview]
Message-ID: <01b801c393b0$3c837080$0301a8c0@SIMON> (raw)
Hi,
I have a small network with several Windows client PCs, a Linux
firewall/server, and two links to the Internet. What I want to do is
have certain traffic (based on source and/or destination ports) routed
through one link while everything else goes through the other.
The first link is a 256k wireless/radio connection with a static IP. The
second is a 128k ADSL connection via an external ADSL modem/router with
a dynamic IP.
The Linux (2.4) firewall machine has two network interfaces, eth0
[192.168.1.2] connects it to the LAN, and eth1 [1.2.3.4] which plugs
straight into the wall (the wireless link).
The ADSL modem has a LAN IP [192.168.1.1] and itself acts as a NAT
device.
All the client PCs are set to use the Linux firewall as their gateway,
and I have it set up to do NAT. The Linux firewall has two default
gateway addresses, one for eth0 (the ADSL router, 192.168.1.1) and one
for eth1 (the wireless gateway, 1.2.3.3). Currently eth1 is set as the
lower metric so that all data is going out through the wireless link,
and the ADSL is not being used. If I swap this around, vice versa works
also.
How can I set it up to route some data out through eth1 and some through
the ADSL (based on sport/dport)? I've tried adding a rules like:
/sbin/iptables -t nat -A POSTROUTING -p tcp --dport 80 -o eth0 -j
MASQUERADE
/sbin/iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
But this doesn't seem to do anything, http is still routed through the
wireless.
Help!
-Simon
next reply other threads:[~2003-10-16 6:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-16 6:37 Simon Garner [this message]
2003-10-16 7:45 ` NAT with two Internet links Simon Garner
-- strict thread matches above, loose matches on Subject: below --
2003-10-16 9:08 Gaby Schilders
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='01b801c393b0$3c837080$0301a8c0@SIMON' \
--to=sgarner@expio.co.nz \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.