~
Thanks to your post though I have gone in and run the command and nvram commit to set the port to 0 and will see what comes from that.
I am running Merlin firmware and have set my ALG for my FTP to a random one between 1-65535 not including the default port 21. The GUI doesn't allow 0.
In a SSH session when I type:
I see "xxxxx" << the random FTP port I selected on the Merlin GUI.
I see "0" << the FTP port I selected.
The problem I see with that solution that after you reboot the router, won't it revert back to the random FTP port selected in the Merlin GUI between 1-65536?
To have the new FTP setting survive a reboot wouldn't you need to add the command to a script like /jffs/scripts/services-stop:
nvram set vts_ftpport=0
nvram commit
NOTE: Actually thinking more about this. The chronological order of events. This would not work since the Merlin ALG GUI would still want to set the FTP port to a random one set by the user?
The event to change the FTP ALG port to =0 would have to occur after the GUI sets the port.
2nd NOTE: Actually thinking more(r)
about this and reading the OP I guess the 2 commands ["nvram commit" optional?] listed above would be added to the "/jffs/scripts/firewall-start" script at the SSH session?
The first 2 Screenshots below show the GUI after "nvram set vts_ftpport=0" then after a reboot. the FTP ALG port reverts back to my user set FTP ALG port "xxxx1" set up originally at the Merlin GUI.
The 3rd screenshot shows the results after typing at the command prompt in ssh then rebooting:
Code:
nvram set vts_ftpport=0
nvram commit
The change did stick this time, though not sure if "nvram commit's" are a good policy to utilize.