From: Junus Junarto junus@mail.com
To: lartc@vger.kernel.org
Subject: [LARTC] routing
Date: Fri, 05 Jan 2001 12:33:25 +0000 [thread overview]
Message-ID: <marc-lartc-98373940416823@msgid-missing> (raw)
In-Reply-To: <marc-lartc-98373940416816@msgid-missing>
<PRE>You could do it with kernel 2.2 without port assignment too:
You can keep to use your ordinary maquerade and add two line of commands
below :
Make IP NAT:
- ip rule add from 192.168.0.5/32 nat 194.219.85.4
(to make NAT a subnetwork form 192.168.0.4 - 192.168.0.7 just change prefik
to 30:
- ip rule add from 192.168.0.4/30 nat 194.219.85.4)
Add IP aliasing 194.219.85.4 to interface with real address: (e.g: eth0)
- ifconfig eth0:0 194.219.85.4 netmask 255.255.255.0
( or use IP command:
- ip addr add 194.219.85.4/24 dev eth0 )
Note: you must active advance networking option at linux kernel
configuration before use ip command.
Regards,
Junus Junarto D
><i> --__--__--
</I>><i>
</I>><i> Date: Wed, 03 Jan 2001 07:37:31 -0500
</I>><i> From: "David A. Bandel" <<A HREF="mailto:david@pananix.com">david@pananix.com</A>>
</I>><i> Organization: Pananix, S.A.
</I>><i> To: Spyros Dimas <<A HREF="mailto:spyros@liaison.gr">spyros@liaison.gr</A>>
</I>><i> Cc: <A HREF="mailto:lartc@mailman.ds9a.nl">lartc@mailman.ds9a.nl</A>
</I>><i> Subject: Re: [LARTC] routing
</I>><i>
</I>><i> Spyros Dimas wrote:
</I>><i> >
</I>><i> > Hello and Happy New Year!
</I>><i> > We have a LAN with 2 interfaces. One is configured with addresses
</I>><i> > 192.168.0.x (pseudo-addresses) and other one with real addresses, so we
</I>><i> > use ip-masquerade. But we would like one of workstation witch has a
</I>><i> > address 192.168.0.5 to have a real address, such us 194.219.85.4, on the
</I>><i> >
</I>><i> > first interface or on the second. Could you tell us how we can do it. Or
</I>><i> > if you have
</I>><i> > another idea. Thanks.
</I>><i>
</I>><i> This is really an issue for your firewall/masquerade software. If you
</I>><i> are masquerading using Linux and either ipchains (2.2.x) or iptables
</I>><i> (2.4.x) it's easy.
</I>><i>
</I>><i> In either case, your firewall/masquerade server needs to have
</I>><i> 194.219.85.4 aliased on the external interface, then:
</I>><i>
</I>><i> 2.2.x:
</I>><i> get ipmasqadm and set up a portforward from the masq server to the
</I>><i> workstation. Assuming you want to forward only port 80, the following
</I>><i> will work:
</I>><i> ipmasqadm portfw -a -P tcp -L 194.219.85.4 80 -R 192.168.0.5 80
</I>><i>
</I>><i> better:
</I>><i> 2.4.x:
</I>><i> use iptables and runthe following:
</I>><i> iptables -t nat -A PREROUTING -d 194.219.85.4 -p tcp --dport 80 -j DNAT
</I>><i> --to-destination 192.168.0.5:80
</I>><i>
</I>><i> With iptables you can easily omit the port stuff so everything passes
</I>><i> (just like the workstation is on the Internet) or qualify your matches
</I>><i> with -m multiport and select several individual ports or a range (or
</I>><i> ranges) of ports.
</I>><i>
</I>><i> Ciao,
</I>><i>
</I>><i> David A. Bandel
</I>><i> --
</I>><i> Focus on the dream, not the competition.
</I>><i> -- Nemesis Racing Team motto
</I>><i> *** sent via a Linux 2.4.0-test12 system ***
</I>><i>
</I>><i>
</I>><i>
</I>><i> --__--__--
</I>><i>
</I>><i> _______________________________________________
</I>><i> LARTC mailing list
</I>><i> <A HREF="mailto:LARTC@mailman.ds9a.nl">LARTC@mailman.ds9a.nl</A>
</I>><i> <A HREF="http://mailman.ds9a.nl/mailman/listinfo/lartc">http://mailman.ds9a.nl/mailman/listinfo/lartc</A>
</I>
______________________________________________
FREE Personalized Email at Mail.com
Sign up at <A HREF="http://www.mail.com/?sr=signup">http://www.mail.com/?sr=signup</A>
</PRE>
next prev parent reply other threads:[~2001-01-05 12:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-03 11:13 [LARTC] routing Spyros
2001-01-03 12:37 ` David
2001-01-05 12:25 ` Junus
2001-01-05 12:33 ` Junus [this message]
2001-07-06 14:03 ` [LARTC] Routing Dave Miller
2001-07-06 15:01 ` Arthur van Leeuwen
2001-07-06 15:18 ` Dave Miller
2001-07-07 6:33 ` Deepak singhal
2001-07-07 18:24 ` Arthur van Leeuwen
2001-07-07 18:33 ` Dave Miller
2001-07-07 18:37 ` Arthur van Leeuwen
2001-12-25 4:58 ` [LARTC] routing Daniel Wittenberg
2001-12-25 12:16 ` bert hubert
2002-10-30 12:57 ` [LARTC] Routing Jose Sebastiao Martins
2002-10-30 15:57 ` Martin A. Brown
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-98373940416823@msgid-missing \
--to=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.