Re: FC4 IP Masquerading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tony Crouch wrote:

> Hi All,
> I have spent the last few days trying to set up an IP masquerading
> situation on my home LAN (which only consists of my FC4 notebook and my
> windows XP desktop). I have gone through all the sites and read all
> about IP tables, but alas I still can't get it setup.
> 
> The IPs' of my two machines are:
> Notebook (aka: masquerading box) : 192.168.0.1
> Desktop : 192.168.0.2
> 

Try the following three lines as a start:

/sbin/iptables -D POSTROUTING -t nat -s 192.168.0.0/24 -d ! 192.168.0.0/24 \
-j MASQUERADE

/sbin/iptables -t nat -s 192.168.0.0/24 -d ! 192.168.0.0/24 -A POSTROUTING \
-j MASQUERADE

echo 1 > /proc/sys/net/ipv4/ip_forward


If it works, to make it permanent, the first two (without /sbin/iptables)
can be added to /etc/sysconfig/iptables. I'm sure there's a proper way to
turn on ip_forward, but I just put the third line in rc.local.

> My firewall has been turned off within: "Desktop --> System Settings -->
> Security Level".
> 

This is not a good idea, even on dial-up. Turn the firewall on, then allow
any traffic through eth0 (or whatever your LAN is on) using:

/sbin/iptables -I RH-Firewall-1-INPUT 2 -i eth0 -j ACCEPT


Let us know if it works!


Jonathan

-- 
http://jonathan.rawle.org/



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux