0

Can I add multiple Bind port to PureFtpD on Ubuntu machine? I could change the binding port editing the /etc/pure-ftpd/Bind file. But I cannot understand how set an additional port. I tried to add a new line in Bind file but it doesn't work.

Tobia
  • 1,210
  • 8
  • 37
  • 73

1 Answers1

0

It seems that pure-ftpd does not support multiple Bind statements in the configuration. It also did not work by specifying multiple bind options on the command line -S.

As a workaround, it can be done using iptables DNAT rule like the following:

$ sudo iptables -t nat -A OUTPUT -p tcp --dport 1021 -j DNAT --to-destination :21

This rule enables you to receive FTP traffic on both ports: 21 (default one) and 1021.

Khaled
  • 35,688
  • 8
  • 69
  • 98