Hello All,
I was advised by a very knowledgable fellow forum member(anav) on a different thread that was related to Wireguard that my FTP setup is incorrect and I need to resolve this. I decided to keep the wireguard issue and ftp issue separate and start a separate thread about his comments about my FTP setup.
I’m sure anav is fed up with my questions and lack of understanding that he probably doesn’t have the energy to deal with me anymore. so I am reaching out to all you clever people to try and help me as a beginner to mikrotik understand his recommendations.
WHAT I AM TRYING TO ACHIEVE (it is currently working fine with my set up)
I use the USB storage port on my RB5009 for a 1TB nvme drive so that I can FTP files from a WAN server on to this device for backup purposes. It is the most convenient solution for me so that I do not have to set up a dedicated FTP server somewhere on my LAN. The router already has one so why not use it (that’s my logic anyway).
The fellow forum member commented that the following rules do not make any sense:
add action=accept chain=input dst-port=21 in-interface-list=WAN log=yes
log-prefix="FTP - " protocol=tcp src-address-list=
allow_hostprovider_trafficadd action=accept chain=input dst-port=21 in-interface-list=WAN log-prefix=
"FTP - " protocol=tcp src-address-list=
allow_uptime_robot_traffic
He additionally commented the following:
If you are attempting FTP for example, the input chain is NOT used for this… One uses the dstnat chain. One rule is used in the forward chain to allow port forwarding in general.To make that port forwarding rule clear, remove this default.
add action=drop chain=forward comment=
“defconf: drop all from WAN not DSTNATed” connection-nat-state=!dstnat
connection-state=new in-interface-list=WAN
Replace with
add action=accept chain=forward comment=“internet traffic” in-interface-list=LAN out-interface-list=WAN
add action=accept chain=forward comment=“remote users to LAN” in-interface=Wireguard1 dst-address=10.0.0.0/24
add action=accept chain=forward comment=“port forwarding” connection-nat-state=dstnat
add action=drop chain=forward comment=“drop all else”
As you can see, he stated that the input chain is not used for this purpose and yet the USB storage device is connected directly to the router. It’s not a device on the LAN where the traffic needs to be forwarded on the forward chain.
He further commented the following about the setup.
What you have done is open up an un-encrypted a path to the configuration door of your router by every hacking bot in the world that searches on port 21. The only thing protecting the config is your user name and password (plain text) which is easily defeated by AI and quickly.
Suggest the first you do is unplug the router and netinstall a fresh copy.
I am a little confused at his comments because I feel his suggestion of wiping the entire router just to fix 2 firewall rules seemed very extreme to me. Additionally, the two rules are also limited by the src address list containing the source IPs only and in my mind that means that the only IPs that can connect to the router through these firewall rules are the ones I specified in the src address list. So how can “every hacking bot in the world that searches on port 21” have access to the router if they are not on the specified address list?
Have I so grossly misunderstood how src address lists work?
In my mind it stands to reason that if I want to upload files to this connected storage device on the router itself from the WAN, there needs to be a firewall rule on the input chain so that the traffic can be directed straight to the router where the USB device is connected to.
So are anav’s comments suggesting a better solution to the one I already have? Keep in mind that the firewall rules for the FTP service is limiting the src addresses to ONLY the devices that are allowed to FTP files to the server.