From: Diogo Sperb Schneider <diogo@kildare.ind.br>
To: netfilter@vger.kernel.org
Subject: Routing HTTP Through Another Link
Date: Fri, 11 Sep 2009 11:30:40 -0300 [thread overview]
Message-ID: <3b71447d0909110730k71e340e2uec06d35c842fd73d@mail.gmail.com> (raw)
Greetings!
I gave up on that old web-based firewall and now I'm running plain
CentOS 4.8 with 3 ethernet adapters:
eth0 = LAN
eth1 = WAN
eth2 = ADSL
So I tried the following:
ip route add default via 189.30.16.65 dev eth1 table WAN # < 1 in
/etc/iproute2/rt_tables
ip route add default via 192.168.2.1 dev eth2 table ADSL # < 2 in
/etc/iproute2/rt_tables
ip rule add from all fwmark 1 table WAN
ip rule add from all fwmark 2 table ADSL
iptables -t mangle -I PREROUTING -i eth0 -p tcp --dport 80 -j MARK
--set-mark 2 # Tried with -I and -A with same effect
(Got those from the Linux Advanced Routing mini HOWTO)
Still, when I browse IP detection websites I get my WAN IP address.
Just for the record; My other relevant netfilter rules are:
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source
189.30.16.66 # <- my adapter's IP address
iptables -t nat -A POSTROUTING -o eth2 -j SNAT --to-source
192.168.2.254 # <- my adapter's IP address
iptables -A FORWARD -i eth0 -p tcp --dport 80 -j ACCEPT # HTTP
Many thanks for reading!
Diogo
next reply other threads:[~2009-09-11 14:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-11 14:30 Diogo Sperb Schneider [this message]
2009-09-11 18:19 ` Routing HTTP Through Another Link Diogo Sperb Schneider
2009-09-13 6:49 ` Marek Kierdelewicz
-- strict thread matches above, loose matches on Subject: below --
2009-08-31 18:30 Diogo Sperb Schneider
2009-09-01 5:55 ` Marek Kierdelewicz
[not found] ` <BLU116-W61B4883A90045AEF7BDB6A2F10@phx.gbl>
[not found] ` <20090901135848.793936a7@catlap>
2009-09-01 16:42 ` Diogo Sperb Schneider
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=3b71447d0909110730k71e340e2uec06d35c842fd73d@mail.gmail.com \
--to=diogo@kildare.ind.br \
--cc=netfilter@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox