Re: ip masquerading in 2.1.x

David Burrows (snadge@gemcorp.com.au)
Sat, 17 Jan 1998 12:17:29 +1000 (EST)


On Fri, 16 Jan 1998, Chris Atenasio wrote:

> Is ip masquerading supposed to be working right now in 2.1.x? Every time
It sure does..
> I switch to the dev kernels I find myself switching back because my
> computer serves as masquerader for half a dozen others. Do I need to
> apply some patch? I already tried upgrading all my apps as noted on
> www.linuxhq.com but still no go. Do I need some special utility? help!
>
> Thanks in advance.
>
> - chris

Ok, the only thing different from 2.0.x is that you need to enable ip
forwarding now to get it to work.. I'll show you what I put in my rc.local
script.

# Load IP Masquerading modules
modprobe ip_masq_ftp
modprobe ip_masq_irc ports=6665,6666,6667,6668,6669,31337
modprobe ip_masq_raudio
modprobe ip_masq_quake
modprobe ip_masq_vdolive

# Enable IP Masquerading forwarding rules
ipfwadm -F -p masquerade
ipfwadm -F -a m -S 192.168.0.0/24 -D 0.0.0.0/0 -W eth0

# Start IP forwarding
echo "1" > /proc/sys/net/ipv4/ip_forwarding

Now, I can't be sure that having masquerade as the default rule for
forwarding is a smart thing to do, but that's the only way I could get it
to work. If I use default rule deny, it will not work.

Regards,

Dave.