All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard van Breemen <ard@telegraafnet.nl>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] help on iproute2
Date: Tue, 05 Mar 2002 17:36:50 +0000	[thread overview]
Message-ID: <marc-lartc-101534985520015@msgid-missing> (raw)
In-Reply-To: <marc-lartc-101506260304664@msgid-missing>

On Sat, Mar 02, 2002 at 01:48:43AM -0800, Bambang Yulianto wrote:
> hi guys .. I'm linux newbie
> I have LAN that connected to internet.
> here is the pic :
> 
> [internet]----------[Linux]----------[LAN]
>     |                  |               |
> 202.149.83.192-207  202.149.83.194   192.168.0.1-35
> 
> with RedHat Linux 2.4.18, how can I make every 4 ip on
> LAN will be 1 ip on the internet ? (sorry abt my
> english )
> example: 
> 
> 192.168.0.1-4 ---> 202.149.83.195
> 192.168.0.4/30 --> 202.149.83.196
> 192.168.0.8/30 --> 202.149.83.197
You are actually saying that your system was masquerading.

> with my old linux (2.2.16) ..
> I use :
> modprobe dummy
> ifconfig dummy0 202.149.83.195 netmask 255.255.255.240
> ifconfig dummy0:1 202.149.83.196 netmask
> 255.255.255.240
> ifconfig dummy0:2 202.149.83.197 netmask
> 225.255.255.240
> .
> .
> .
> ip rule add from 192.168.0.0/30 nat 202.149.83.195
> ip rule add from 192.168.0.4/30 nat 202.149.83.196
> ip rule add from 192.168.0.8/30 nat 202.149.83.197
> .
> .
> .
> 
> but It's NOT WORKING on my new 2.4.18 Linux.
This is on 2.2 a way to masquerade from specific ip adresses.
As you can read in the ip manual, it really uses the ipchains masquarading
stuff.
As it also says in the manual that this has completely been removed
(except for fastnat) from that layer, since netfilter does it good.
> what should I do ?
Use netfilter/iptables.
iptables -t nat --append POSTROUTING --source 192.168.0.0/30 --jump SNAT --to-source 202.149.83.195
Or something like that.
-- 
<ard@telegraafnet.nl> Telegraaf Elektronische Media  http://wwwijzer.nl
http://leerquoten.monster.org/ http://www.faqs.org/rfcs/rfc1855.html 
Let your government know you value your freedom. Sign the petition:
http://petition.eurolinux.org/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

      parent reply	other threads:[~2002-03-05 17:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-02  9:48 [LARTC] help on iproute2 Bambang Yulianto
2002-03-02 13:24 ` bert hubert
2002-03-02 13:45 ` Julian Anastasov
2002-03-05 17:36 ` Ard van Breemen [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=marc-lartc-101534985520015@msgid-missing \
    --to=ard@telegraafnet.nl \
    --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.