* ip masqurade
@ 2003-06-06 16:31 Gary Metcalf
0 siblings, 0 replies; 3+ messages in thread
From: Gary Metcalf @ 2003-06-06 16:31 UTC (permalink / raw)
To: netfilter
I'm running Slackware 8.1 with kernel 2.4.18. I'm needing to have some
computers on my LAN to gateway to the internet via my Linux Modem. My
modem does connect to the internet ok and I can use it via my Linux
system. What I don't know and have been reading the How-To's is how to
set this thing up. I've un-remarked some lines in my rc.modules file
that is supose to allow ipmasqurade when I boot. Now I have learned that
I need to build some tables and this is where I get lost.
My Linux IP address is: 192.168.168.1 and one of my computers
(windows) on my lan is: 192.168.168.2
What lines do I need to input for iptables to set this up where it will
allow browsing and mail for my windows computer and other computers on
my lan which will fall in the ip range of 192.168.168.0/24
Gary
^ permalink raw reply [flat|nested] 3+ messages in thread
* ip masqurade
@ 2003-06-07 2:17 Gary Metcalf
2003-06-08 21:21 ` Rob Sterenborg
0 siblings, 1 reply; 3+ messages in thread
From: Gary Metcalf @ 2003-06-07 2:17 UTC (permalink / raw)
To: netfilter
I'm running Slackware 8.1 with kernel 2.4.18. I'm needing to have some
computers on my LAN to gateway to the internet via my Linux Modem. My
modem does connect to the internet ok and I can use it via my Linux
system. What I don't know and have been reading the How-To's is how to
set this thing up. I've un-remarked some lines in my rc.modules file
that is supose to allow ipmasqurade when I boot. Now I have learned that
I need to build some tables and this is where I get lost.
My Linux IP address is: 192.168.168.1 and one of my computers
(windows) on my lan is: 192.168.168.2
What lines do I need to input for iptables to set this up where it will
allow browsing and mail for my windows computer and other computers on
my lan which will fall in the ip range of 192.168.168.0/24. I've set up
my windows to use Gateway to my linux ip.
Gary
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: ip masqurade
2003-06-07 2:17 ip masqurade Gary Metcalf
@ 2003-06-08 21:21 ` Rob Sterenborg
0 siblings, 0 replies; 3+ messages in thread
From: Rob Sterenborg @ 2003-06-08 21:21 UTC (permalink / raw)
To: 'netfilter'
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-06-08 21:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-07 2:17 ip masqurade Gary Metcalf
2003-06-08 21:21 ` Rob Sterenborg
-- strict thread matches above, loose matches on Subject: below --
2003-06-06 16:31 Gary Metcalf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).