[plug] Ipmasqadm help

Marc Wiriadisastra marc-w at smlintl.com.au
Tue Oct 26 08:33:50 WST 2004


Joong Cho wrote:
> 
> Hello
> 
> When I try the ipmasqadm to redirect my ports, I get the error message: 
> portfw: setsockopt failed: protocol not available.
> 
> How do I fix this problem?
Depending on the system you just have to set ip_forward 1 and that 
should enable IP forwarding but you need to get iptables to organise the 
SNAT and DNAT depending on what you are doing.  Its hard to sorta get a 
good idea of what your trying but I'll post an example of one port that 
I forward.



iptables -t nat -A PREROUTING -p tcp --dport 65535 -j DNAT --to 
192.168.0.104




I also however add some modules to the firewall script because for some 
reason fedora needs them added in a firewall script (I think).

> modprobe ip_nat_ftp
> modprobe ip_nat_tftp
> modprobe ip_nat_irc
> modprobe ip_conntrack
> modprobe ip_conntrack_ftp
> modprobe ip_conntrack_tftp
> modprobe ip_conntrack_irc


Thanks basically it its dependant on what you have and what you want to 
forward and all of that.  Create a little script or get webmin to help 
in creating your firewall.  Although I don't use webmin cause I don't 
know where they store the file and I like to know where things are.

HTH

Marc


P.S. Sorry for the long post all thats left is the rest of my script :P




More information about the plug mailing list