From: "Benjamin Tompkins" <netfilter@dahanga.org>
To: netfilter@lists.netfilter.org
Subject: Unusual routing problem
Date: Mon, 24 Mar 2003 13:25:31 -0500 [thread overview]
Message-ID: <04d501c2f232$c0dbebc0$93a22ad1@blueone.net> (raw)
I am attempting to route myself an ip block from my office to my home via a
tunnel. Simple enough. The catch is, I only want the tunnel to be used for
lan destined traffic and incoming connections to my IP block. The lan
destined traffic is easy, the trick apparently is getting the block to be
accessible via the internet, without forcing all traffic to use the tunnel.
A diagram.
eth0 (DHCP) cable modem eth1 (x.x.x.1/28) LAN
\ /
Linux Machine
|
ppp0 (x.x.x.2/30)
Ok, so what I have so far is as follows.
This takes care of access to the office network.
route add -net x.x.x.1 netmask 255.255.255.240 dev eth1
route add -net x.x.x.0 netmask 255.255.254.0 dev ppp0
route add -host x.x.x.1 dev eth0
Now to use the cable for everything else.
iptables -A POSTROUTING -s x.x.x.1/28 -o eth0 -j MASQUERADE
So now I can access my office lan and vice versa, and everything else gets
masqed out the cable. But I'm having a heck of a time letting the box to
know that stuff requested via ppp0, needs to go out ppp0. I have looked at
using the mangle table making rules for input and forward, but am just
missing something along the way. Any help anyone can offer would be greatly
appreciated. Thanks.
next reply other threads:[~2003-03-24 18:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-24 18:25 Benjamin Tompkins [this message]
2003-03-24 19:28 ` Unusual routing problem Kim Jensen
2003-03-30 19:00 ` Benjamin Tompkins
2003-03-31 16:52 ` Kim Jensen
-- strict thread matches above, loose matches on Subject: below --
2003-03-24 18:18 Benjamin Tompkins
2003-04-01 17:58 ` Matthew G. Marsh
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='04d501c2f232$c0dbebc0$93a22ad1@blueone.net' \
--to=netfilter@dahanga.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox