From: "Rob Sterenborg" <rob@sterenborg.info>
To: 'netfilter' <netfilter@lists.netfilter.org>
Subject: RE: ip masqurade
Date: Sun, 8 Jun 2003 23:21:57 +0200 [thread overview]
Message-ID: <00eb01c32e03$fe2b5c60$0401000a@sterenborg.info> (raw)
In-Reply-To: <3EE14B43.7060102@lou-telecom.net>
> computers on my LAN to gateway to the internet via my Linux Modem. My
You use a modem, so I guess you have aa ppp internet interface and a
dynamic IP address.
That's why we'll be using MASQUERADE. Otherwise use SNAT.
> my lan which will fall in the ip range of 192.168.168.0/24.
# First disable forwarding so that nothing will happen before your rules
are set.
echo 0 > /proc/sys/net/ipv4/ip_forward
# Forward packets coming from your LAN to internet, DROP everything
else.
# When not specifying a table, the filter table is assumed.
iptables -P FORWARD DROP
iptables -A FORWARD -i <if_lan> -o <if_inet> -s 192.168.168.0/24 -j
ACCEPT
iptables -t nat -A POSTROUTING -o <if_inet> -s 192.168.168.0/24 -j
MASQUERADE
# Enable forwarding.
echo 1 > /proc/sys/net/ipv4/ip_forward
Gr,
Rob
next prev parent reply other threads:[~2003-06-08 21:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-07 2:17 ip masqurade Gary Metcalf
2003-06-08 21:21 ` Rob Sterenborg [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-06-06 16:31 Gary Metcalf
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='00eb01c32e03$fe2b5c60$0401000a@sterenborg.info' \
--to=rob@sterenborg.info \
--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