Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Stuart J. Browne" <stuart@promed.com.au>
To: bob@spectrum-comm.com, netfilter@lists.netfilter.org
Subject: RE: router w/ iptables using nat and routing
Date: Wed, 22 Oct 2003 10:42:03 +1000	[thread overview]
Message-ID: <05c901c39835$4f94b420$2288e7c0@promed.com.au> (raw)
In-Reply-To: <oprxe4xwgvv668az@mail.theiversons.us>

eth0 = Internet
eth1 = non-nat
eth2 = nat stuff

route add default eth0

iptables -t nat -I POSTROUTING -j SNAT -s 10.0.0.0/8 -o eth0 --to
66.119.211.74

If you need NAT from the 10's to the 64's, then

iptables -t nat -I POSTROUTING -j SNAT -s 10.0.0.0/8 -o eth1 --to
64.146.167.254

Shouldn't really need anything more complex than that.

bkx

>-----Original Message-----
>From: netfilter-admin@lists.netfilter.org 
>[mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Bob Iverson
>Sent: Wednesday, 22 October 2003 10:29
>To: netfilter@lists.netfilter.org
>Subject: router w/ iptables using nat and routing
>
>
>i am setting up a router using rh8.0
>
>it has 3 interfaces, eth0 66.119.211.74/30, eth1 
>64.146.167.254/27, eth1 
>10.10.1.1/8
>
>currently i use two routers to accomplish my need. that is to 
>route from 
>eht0 my isp link to eth1 my routable subnet, containing email, 
>dns, vpn and 
>web sites. and do NAT on eth1 to 10.10.1.1-10.10.1.255 for my 
>customers who 
>do not need routable addresses.
>i can make one or the other work, nat 10.10.1.1 to the 
>internet. or route 
>64.x.x.x to the internet. but i have not been able to get both to work.
>
>currently i have a router doing 66.119.211.74 to 64.146.167.254. and a 
>router doing 10.10.1.1 to 64.146.167.228 w/NAT. then they are 
>connected on 
>the 64. network to allow access to dns, email and web.
>
>is it possible to run one machine with 3 card to accomplish this task?
>
>-- 
>Bob Iverson
>SPECTRUM COMMUNICATIONS
>765-7773
>bob@spectrum-comm.com
>



      reply	other threads:[~2003-10-22  0:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-22  0:28 router w/ iptables using nat and routing Bob Iverson
2003-10-22  0:42 ` Stuart J. Browne [this message]

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='05c901c39835$4f94b420$2288e7c0@promed.com.au' \
    --to=stuart@promed.com.au \
    --cc=bob@spectrum-comm.com \
    --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