d7fdbd
From c5daaedf1efe23b397a5950f5503f5cbfac871c8 Mon Sep 17 00:00:00 2001
d7fdbd
From: Martin Sehnoutka <msehnout@redhat.com>
d7fdbd
Date: Wed, 7 Sep 2016 14:25:28 +0200
d7fdbd
Subject: [PATCH 15/59] Listen on IPv6 by default.
d7fdbd
d7fdbd
---
d7fdbd
 vsftpd.conf   | 14 +++++++++-----
d7fdbd
 vsftpd.conf.5 |  5 +++--
d7fdbd
 2 files changed, 12 insertions(+), 7 deletions(-)
d7fdbd
d7fdbd
diff --git a/vsftpd.conf b/vsftpd.conf
d7fdbd
index db44170..ae6c6c9 100644
d7fdbd
--- a/vsftpd.conf
d7fdbd
+++ b/vsftpd.conf
d7fdbd
@@ -111,12 +111,16 @@ xferlog_std_format=YES
d7fdbd
 # When "listen" directive is enabled, vsftpd runs in standalone mode and
d7fdbd
 # listens on IPv4 sockets. This directive cannot be used in conjunction
d7fdbd
 # with the listen_ipv6 directive.
d7fdbd
-listen=YES
d7fdbd
-#
d7fdbd
-# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
d7fdbd
-# sockets, you must run two copies of vsftpd with two configuration files.
d7fdbd
+listen=NO
d7fdbd
+#
d7fdbd
+# This directive enables listening on IPv6 sockets. By default, listening
d7fdbd
+# on the IPv6 "any" address (::) will accept connections from both IPv6
d7fdbd
+# and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6
d7fdbd
+# sockets. If you want that (perhaps because you want to listen on specific
d7fdbd
+# addresses) then you must run two copies of vsftpd with two configuration
d7fdbd
+# files.
d7fdbd
 # Make sure, that one of the listen options is commented !!
d7fdbd
-#listen_ipv6=YES
d7fdbd
+listen_ipv6=YES
d7fdbd
 
d7fdbd
 pam_service_name=vsftpd
d7fdbd
 userlist_enable=YES
d7fdbd
diff --git a/vsftpd.conf.5 b/vsftpd.conf.5
d7fdbd
index 0744f85..72bb86f 100644
d7fdbd
--- a/vsftpd.conf.5
d7fdbd
+++ b/vsftpd.conf.5
d7fdbd
@@ -297,8 +297,9 @@ Default: NO
d7fdbd
 .TP
d7fdbd
 .B listen_ipv6
d7fdbd
 Like the listen parameter, except vsftpd will listen on an IPv6 socket instead
d7fdbd
-of an IPv4 one. This parameter and the listen parameter are mutually
d7fdbd
-exclusive.
d7fdbd
+of an IPv4 one. Note that a socket listening on the IPv6 "any" address (::)
d7fdbd
+will accept both IPv6 and IPv4 connections by default. This parameter and the
d7fdbd
+listen parameter are mutually exclusive.
d7fdbd
 
d7fdbd
 Default: NO
d7fdbd
 .TP
d7fdbd
-- 
d7fdbd
2.14.4
d7fdbd