All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin A. Brown" <mabrown-lartc@securepipe.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Routing private and non-private ips
Date: Tue, 16 Jul 2002 18:19:19 +0000	[thread overview]
Message-ID: <marc-lartc-102684364405667@msgid-missing> (raw)
In-Reply-To: <marc-lartc-102676164426604@msgid-missing>

Lucky,

If I understand correctly what you are trying to do, it is simple static 
network address translation.  The following commands should give you 
static NAT.

Choose an IP in your /29 and make it the public IP.  Choose an IP in the 
internal rfc 1918 network and make it the private IP.  Now try the 
following:

  ip route add nat pu.bl.ic.ip via pr.iv.at.ip
  ip rule add nat pu.bl.ic.ip from pr.iv.at.ip prio $PRIO
  ip route flush cache

As for the packet filtering, you'll have to make a second set of rules.

You'll need to allow the packet from outside to the public IP and you'll 
need to add a second set of rules to allow the packet from outside to the 
private IP.

Good luck,

-Martin

On Mon, 15 Jul 2002, Lucky wrote:

 : Hi folks!
 : 
 : I have a little problem here, probably not related to LAR and surely not to 
 : TC, but I don't know somebody else to ask.
 : 
 : The scenario is as follows:
 : 
 : Router R has two connections to the internet (ippp3, static IP-Address with 
 : and a /29er network N1 routed to, and ppp0, dynamic IP-Address), one to the 
 : local network N2 (eth0).
 : Currently, R does the following:
 : 
 : - masqerades all connections from N2 to the Internet
 : - policy-routes packets originating from connections from ippp3 back to ippp3
 : - firewalls
 : 
 : Now I'd like to give a Host H1 in N2 a local, private IP-Address _and_ a
 : public, non-private IP-Address from our /29-net.
 : 
 : How would I do the routing?
 : I tried routing the /29-net through eth0, which lets me ping R to H1, but not
 : vice-versa. The routing from the internet to H1 and vice-versa also didn't
 : work.
 : I allowed nearly everything to and from the /29-net in all of the input, 
 : forward and output-chains (I'm currently using Linux 2.2.20).
 : 
 : Any help would be really appreciated.
 : 
 : Please Cc' me on answers, cause I'm getting the list only in digest-mode.
 : 
 : 

-- 
Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com



_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

  reply	other threads:[~2002-07-16 18:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-15 19:32 [LARTC] Routing private and non-private ips Lucky
2002-07-16 18:19 ` Martin A. Brown [this message]
2002-07-17 15:15 ` Lukas Kolbe
2002-07-17 17:18 ` Martin A. Brown
2002-07-19 18:29 ` Lukas Kolbe

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=marc-lartc-102684364405667@msgid-missing \
    --to=mabrown-lartc@securepipe.com \
    --cc=lartc@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 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.