How to enable IPv4 and IPv6 support for vsftpd in RHEL7

Solution Unverified - Updated -

Environment

  • Red Hat Enterprise Linux 7

  • vsftpd

Issue

  • In RHEL6 it was possible to just create another config file for vsftp to enable ipv6. How to achieve the same result with RHEL7?

Resolution

  • In primary /etc/vsftpd/vsftpd.conf file, make sure that these following options are set:
    listen=YES
    listen_ipv6=NO
    listen_address=valid.ipv4.address
  • In secondary /etc/vsftpd/vsftpd_ipv6.conf file, make sure that these following options are set:
    listen=NO
    listen_ipv6=YES
    listen_address6=valid:ipv6:address
  • If vsftpd.service is enabled, issue:
    systemctl disable vsftpd.serivce
  • After that enable:
    systemctl enable vsftpd.target && systemctl enable vsftpd@vsftpd_ipv6.service
  • If vsftpd.service is running, then issue:
    systemctl stop vsftpd.service
  • Start:
    systemctl start vsftpd.target
  • As in prior solution, both listen & listen_ipv6 must be specified in configuration files, otherwise it will not work as intended.

Root Cause

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments