Community discussions

MikroTik App
 
Ixo
just joined
Topic Author
Posts: 22
Joined: Fri Dec 07, 2012 9:43 pm

FTP NAT rule

Fri Dec 07, 2012 9:51 pm

Hi there,

Sorry if I ask the question that is already answered. I did search but didn't find anything.


I created a NAT rule for port 21 to access my server inside my network from outside.
Chain: dstnat
Protocol: tcp
Dst Port: 21
Action: dst-nat
To Address: 192.168.0.12
To Ports:21

It worked for me so I was happy, until I tried to access another FTP server from my own computer inside the network (192.168.0.10). It looks like port is getting forwarded back to my server no matter what hostname/IP I use.

Can you please tell me what am I doing wrong?

Appreciate any feedback.
 
grizly
just joined
Posts: 19
Joined: Thu Nov 29, 2012 2:15 am
Location: Melbourne/Australia

Re: FTP NAT rule

Tue Dec 11, 2012 5:43 am

Can you show us the rule you are using?
 /ip firewall nat print chain=dstnat
Refer here for specific guidance: http://wiki.mikrotik.com/wiki/Forwardin ... nternal_IP

Note, FTP generally requires port 20 as well.

Don't forget to disable the FTP server in MicroTik
/ip service disable ftp
Also, you will need to specify either an in-interface or a dst-address so it knows how to translate it (from what to what basically).
 
User avatar
cbrown
Trainer
Trainer
Posts: 1839
Joined: Thu Oct 14, 2010 8:57 pm
Contact:

FTP NAT rule

Tue Dec 11, 2012 5:48 am

You need to specify on your nat rule "in-interface" of your WAN interface. Right now your rule is natting everything dst for port 21.
 
Ixo
just joined
Topic Author
Posts: 22
Joined: Fri Dec 07, 2012 9:43 pm

Re: FTP NAT rule

Thu Dec 20, 2012 1:58 am

Thanks for suggestions.
And special thanks to cbrown. That was it. I knew it was something I was missing. Still learning Mikrotik. It's a great device.