Disable IPv6: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 16: | Line 16: | ||
<pre>Listen 0.0.0.0:80</pre> | <pre>Listen 0.0.0.0:80</pre> | ||
(in <code>/etc/httpd/httpd.conf</code> and/or <code>/etc/httpd/extra/httpd-ssl.conf</code>) | (in <code>/etc/httpd/httpd.conf</code> and/or <code>/etc/httpd/extra/httpd-ssl.conf</code>) | ||
*To disable IPv6 in <code>bind</code> add <code>-4</code> to <code>NAMED_OPTIONS</code> | *To disable IPv6 in <code>bind</code> add <code>-4</code> to <code>NAMED_OPTIONS</code> in <code>/etc/default/named</code>, add | ||
<pre>listen-on-v6 { none; };</pre> | <pre>listen-on-v6 { none; };</pre> | ||
to <code>options</code> in <code>/etc/named.conf</code>, and add | to <code>options</code> in <code>/etc/named.conf</code>, and add | ||
Revision as of 22:09, 30 July 2022
- The kernel option
ipv6.disable=1disables the whole IPv6 stack - If using the kernel option is not possible, add the following parameters to
/etc/sysctl.conf:
# Disable IPv6 net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 net.ipv6.conf.eth0.disable_ipv6 = 1 ...
to prevent configuration of IPv6 for listed interfaces.
- To force
ntpdto not use IPv6 add-4to
CMDLINE="/usr/sbin/ntpd -4 -g"
in /etc/rc.d/rc.ntpd
- To force
sshdto listen IPv4 only add
AddressFamily inet
to /etc/ssh/sshd_config
- To force
httpdto listen IPv4 only, specify an IPv4 address on all Listen directives, for example,
Listen 0.0.0.0:80
(in /etc/httpd/httpd.conf and/or /etc/httpd/extra/httpd-ssl.conf)
- To disable IPv6 in
bindadd-4toNAMED_OPTIONSin/etc/default/named, add
listen-on-v6 { none; };
to options in /etc/named.conf, and add
plugin query "/usr/lib64/named/filter-aaaa.so" {
filter-aaaa-on-v4 yes;
filter-aaaa-on-v6 yes;
};
after options in /etc/named.conf
- To disable IPv6 in
postfixuse the optioninet_protocolsin/etc/postfix/main.cf - To disable IPv6 in
sendmailuse the optionFamily=inetinDAEMON_OPTIONSandCLIENT_OPTIONS