Community discussions

MikroTik App
 
kashifmax
newbie
Topic Author
Posts: 37
Joined: Mon Feb 22, 2016 9:53 pm

FTP from Public IP works in LAN only

Sun Aug 20, 2023 11:17 am

Hi,
I have ftp server (configured as tls) and I put 2 nat rules like (this rule is on top)

chain/action dstnat to-addresses=LAN_IP to-ports=21 dst-address=PUBLIC dst-port=21
chain/action dst-nat to-addresses=LAN_IP to-ports=50000-51000 dst-address=PUBLIC dst-port=50000-51000

When I am in LAN i can access FTP using PUBLIC IP but outside LAN can not connect to FTP server.

Do I need a filter url? It should work without it?

Note: Using hotspot as well.

Thank you
 
tdw
Forum Guru
Forum Guru
Posts: 2118
Joined: Sat May 05, 2018 11:55 am

Re: FTP from Public IP works in LAN only

Sun Aug 20, 2023 8:19 pm

 
kashifmax
newbie
Topic Author
Posts: 37
Joined: Mon Feb 22, 2016 9:53 pm

Re: FTP from Public IP works in LAN only

Tue Aug 22, 2023 7:34 pm

Hi,

Thank you for your reply

I guess it will not work because ISP assigned a private IP to Mikrotic device and when I checked on internet (what is my ip) then it gave me different IP which is a public IP.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 23393
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: FTP from Public IP works in LAN only

Tue Aug 22, 2023 8:25 pm

Correct, for this to work, from exterior you need the ISP router to forward the ports to your device. If they cannot or will not you cannot port forward.

There are ways to get around uncooperative ISPs.
One is find someone who is willing to host a Wireguard on their home MT.
The purpose will be for your router to connect to their wireguard and then people will be able through that connection gain access to your servers via wireguard.
Similarly you could host your own VPS server in the clound or CHR in the cloud..........

Another method is to use zerotier which is third party centrally hosted so you just need to create the network and then allow others to join it.
 
kashifmax
newbie
Topic Author
Posts: 37
Joined: Mon Feb 22, 2016 9:53 pm

Re: FTP from Public IP works in LAN only

Wed Aug 23, 2023 12:01 pm

Thank you so much for the help.

Will look in to it.