PDA

View Full Version : IP masquerading



lhr
04-12-2003, 11:06 PM
Is it possible to use the Knoppix for IP-masquerading using the ipfwadm?
According to my experience it is not:

root@ttyp1[/]# ipfwadm
Generic IP Firewall Chains not in this kernel

:arrow: BUT, I am a greenhorn in Linux, so it may be my fault.
Where is the truth?

Thank You

rickenbacherus
04-13-2003, 01:30 AM
That command doesn't work for me either. I have an ipchains based Linux router that I use for ipmasquerading/DHCP server. Before i built the router I used a very easy to configure program called firestarter.
Here is their homepage so you can see what you're getting and read the manual.
http://firestarter.sourceforge.net/index.php
Knoppix 3.2 has iptables installed already. You will however have one dependency. So.............If you want to share your internet connection AND get a firewall at the same time do this in a terminal:

su
<password>
apt-get install libpanel-applet0
apt-get install firestarter
firestarter

In case you are unaware 'libpanel-applet0' is the dependency mentioned above.
That should get you some ipmasquerading action and get you shored up security wise at the same time.

RockMumbles
04-13-2003, 01:54 AM
First you'll have to load the ipchains module:

modprobe ipchains

then you'll have to configure ipchains, are you running a hd install or from cd?
If you are running from a hd install I'd look into the shorewall package (also shorewall-doc).

rock

adamm
04-13-2003, 02:09 AM
Well, thats weird, i just setup this today. You have to use iptables now.
I have a dialup connection that i'm using and installed copy of knoppix as a router, and a squid caching server.
here is the line that will do masquerading

iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

you will also need to turn on forwarding (very important)

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

replace ppp0 with the port you want to nat to. I'm using dial up so i want to masq to my dialup connection

enjoy!

lhr
04-14-2003, 05:24 PM
thank you
this one with iptables works.