Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Dietmar Hofer <didi156@gmx.net>
To: netfilter@lists.netfilter.org
Subject: How to NAT inside a LAN over a single Interface
Date: Thu, 18 Dec 2003 23:14:50 +0100	[thread overview]
Message-ID: <3FE226DA.5080005@gmx.net> (raw)

I haven't found anythink clearing my problem doing some research in this 
list, nevertheless I'm sorry if you find my question annoying 'cos I'm 
quite new to this issue.

I'm in a class B LAN and would make a Machine work as Gateway for 
another, both in the same network. This because the Internet Gateway 
accepts only requests of registered Interfaces (MAC-based).
The Machine which I want to let do this has only one eth-Interface. what 
in theory should be enough.
I set up NAT with "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE" 
and changed the route on the source machine to use the other as gateway.
When pinging from the source machine, "/var/log/syslog" on the gateway 
shows me this requests:

Dec 18 22:42:44 hogwart kernel: IN=eth0 OUT=eth0 SRC=192.168.2.201 
DST=192.168.2.150 LEN=8
4 TOS=0x00 PREC=0x00 TTL=63 ID=0 DF PROTO=ICMP TYPE=8 CODE=0 ID=7294 SEQ=1

But I don't get an answer on the source machine, (while naturally i can 
ping the given IP from the gateway itself).
In a HOWTO I found the hint that doing NAT with only 1 Interface for 
input and output may not work with this config 'cos since kernel 2.4 
some sort of ICMP redirections doesn't work or so...

What I want to know is just what I've to do to use this machine as 
gateway with only one interface.
Hope you can help



             reply	other threads:[~2003-12-18 22:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-18 22:14 Dietmar Hofer [this message]
2003-12-19 17:26 ` How to NAT inside a LAN over a single Interface Jeffrey Laramie
2003-12-19 19:52   ` Ranjeet Shetye
  -- strict thread matches above, loose matches on Subject: below --
2003-12-19 18:06 bmcdowell

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=3FE226DA.5080005@gmx.net \
    --to=didi156@gmx.net \
    --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