Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Port forwarding

Status
Not open for further replies.

seanf77

IS-IT--Management
Oct 11, 2001
29
0
0
US
If I am using IPCHAINS on my firewall, how would I go about forwarding external FTP requests on ports 20/21 to my internal FTP server sitting at 192.168.0.3?

Thanks!
Sean
 
what you would need is a package called ipmasqadm

i currently forward traffic to port 3306 (mysql) to an internal box from my proxy which has a public ip
after installing the package what you do is make sure you have the modules loaded i.e ip_masq_portfw you will prolly have to modrpobe it.
since you want to forwad traffic to port 21 the syntax in your firewall would be

#Allow ftp
$IPCHAINS -A input -p tcp -s your_public_ip -d $OUTERNET 21 -j ACCEPT

#Masq ftp connections
$IPCHAINS -A forward -p tcp -s 192.168.0.3 21 -j MASQ
/usr/sbin/ipmasqadm portfw -a -P tcp -L your_public_IP 21
-R 192.168.0.3 21

after setting these rules restart your firewall offcourse and then to make sure your rules have registered you can check by issuing this command

ipmasqadm portfw -l

and that is about it ...for refference check this site out


IPconfig
 
Hi there...

Is it possible that ipmasqadm is not compatible with Kernel 2.4 ? I tried to install the package but RPM gave me an error message saying "Kernel>=2.3.0 conflicts with ipmasqadm-0.4.3.i686.rpm"

Is there a way to install this package anyway ? Or another way to do this kind of port forwarding ?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top