Community discussions

MikroTik App
 
smilem
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Tue Jun 26, 2012 10:16 pm

I can't access my ftp from inside ip to outside ip

Sun Aug 25, 2013 2:57 am

Hello, I have a problem that I can't access my FTP that is on my lan by using outside IP.
I have to use the direct connection using my Lan inside IP.

I have set NAT:

Accept FTP forward from ether1_wan to FTP server (ports passive ftp 9000-1000)

Chain: dstnat
dst. address (my outside ip here)
protocol 6
dst port 9000-10000

action: dst-nat
to address (my inside ftp server ip here)
to ports: 9000-10000

I have set Filter rules:


1. Accept FTP forward from ether1_wan to FTP server (ports 20 control 21 transfer)
Chain: forward
dst. address: (my inside ftp server ip here)
protocol 6
dst port: 20-21
in interface: ether1_wan

action: accept

2. Accept FTP forward from ether1_wan to FTP server (ports passive ftp 9000-1000)
Chain: forward
dst. address: (my inside ftp server ip here)
protocol 6
dst port: 9000-10000
in interface: ether1_wan

action: accept

Any ideas what I need to do?
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1742
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: I can't access my ftp from inside ip to outside ip

Sun Aug 25, 2013 3:30 am

Change the destination address on the forward rule to the Public IP instead of the internal IP
 
Rudios
Forum Veteran
Forum Veteran
Posts: 977
Joined: Mon Mar 11, 2013 12:58 pm
Location: The Netherlands

Re: I can't access my ftp from inside ip to outside ip

Sun Aug 25, 2013 8:44 am

Using your inside address is ok, you should add an additional NAT rule.
Search Hairpin NAT
 
smilem
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Tue Jun 26, 2012 10:16 pm

Re: I can't access my ftp from inside ip to outside ip

Fri Aug 30, 2013 5:25 pm

Change the destination address on the forward rule to the Public IP instead of the internal IP
Tried it, did not make any difference.
 
smilem
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Tue Jun 26, 2012 10:16 pm

Re: I can't access my ftp from inside ip to outside ip

Fri Aug 30, 2013 5:27 pm

Using your inside address is ok, you should add an additional NAT rule.
Search Hairpin NAT
Should I add:

/ip firewall nat
add chain=srcnat src-address=[my PC IP address] \
dst-address=[the internal IP of FTP server] protocol=tcp dst-port=20-21 \
out-interface=[LANbridge ports 2-9] action=masquerade

/ip firewall nat
add chain=srcnat src-address=[my PC IP address] \
dst-address=[the internal IP of FTP server] protocol=tcp dst-port=9000-10000 \
out-interface=[LANbridge ports 2-9] action=masquerade
 
smilem
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Tue Jun 26, 2012 10:16 pm

Re: I can't access my ftp from inside ip to outside ip

Fri Aug 30, 2013 5:28 pm

Also I would like to ask about port forwarding, on this guide they do not specify the dst address at all. Instead they specify WAN interface.

http://networkingforintegrators.com/201 ... g-example/

What to use and when?