Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: benjamin Picuira on December 31, 2000, 02:32:45 AM

Title: Port fwd
Post by: benjamin Picuira on December 31, 2000, 02:32:45 AM
yes i know all subjet talk about that .. but i have a question :

my e-smith gateway have an external adr  : 193.252.xxx.xxx and an internal ip 192.168.1.1

my ftp server (port 21) have an internal ip  : 192.168.1.11

i would like to redirect extrenal ftp to my internal ftp
193.252.xxx.xxx:21 to 192.168.1.11:21

i use "redir --lport=21 --cport=21 --caddr=192.168.1.11 --ftp=both"
the response of e-smith is :
server: bind: Address already in use

???? can someone help me ..??

benworld.
NB : Happy New Year
Title: Re: Port fwd
Post by: hanscees on December 31, 2000, 04:39:20 PM
I would think port 21 is in use by the ftp server. Yu would have to run that on anthewr port.

just curious how you redirect? with what program?

hc
Title: Re: Port fwd
Post by: kmcclain on January 02, 2001, 08:44:58 PM
4.1 beta 2 now includes IPmasqadm in the distribution for port forwarding support.
I would assume that is what he was using.
Title: Re: Port fwd
Post by: benjamin Picuira on January 02, 2001, 09:40:16 PM
I Know that but i can't do it with ipmasqadm ... i don't kown how it work ... i have try but it don't work .. ewxplain me how to do .. please
Title: Re: Port fwd
Post by: hanscees on January 03, 2001, 11:30:34 PM
yes, but what program do you use to do redir...... and so on?

hc
Title: Re: Port fwd
Post by: benjamin Picuira on January 05, 2001, 01:44:10 AM
yes with redir you can redirect an incoming connection on public adress to a private adress on port 21.

see the doc on redir.tar.gz

but can you help me to setup ipmasqadm ?

thanks a lot hc.

ben.
Title: Re: Port fwd
Post by: Christopher Smith on January 12, 2001, 12:18:20 AM
Try something like this:

ipmasqadm portfw -a -P tcp -L 193.252.xxx.xxx 21 -R 192.168.1.11 21
ipmasqadm portfw -a -P tcp -L 193.252.xxx.xxx 20 -R 192.168.1.11 20

Port 21 is used for FTP connections, and port 20 is the FTP DATA port. I believe that both have to be masqueraded.

There's a good HOWTO on it at LinuxDoc.org at

http://www.linuxdoc.org/HOWTO/IP-Masquerade-HOWTO-6.html#ss6.8