Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
40
rated 0 times [  40] [ 0]  / answers: 1 / hits: 112061  / 3 Years ago, tue, july 6, 2021, 7:18:30

I disabled IPv6 on an Ubuntu box which has ssh and rsync running. But both of these are still listening on an IPv6 address. How should I fix this?



[email protected]:~# sysctl net.ipv6.conf.all.disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 1
[email protected]:~# sysctl net.ipv6.conf.default.disable_ipv6
net.ipv6.conf.default.disable_ipv6 = 1
[email protected]:~# sysctl net.ipv6.conf.lo.disable_ipv6
net.ipv6.conf.lo.disable_ipv6 = 1


And



[email protected]:~# ss -lnp6
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 :::22 :::* users:(("sshd",1505,4))
LISTEN 0 5 :::873 :::* users:(("rsync",3423,5))

More From » 12.04

 Answers
7

This worked for me:



Add these lines to the bottom of sysctl.conf



net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1


Then run sudo sysctl -p or reboot



source: http://www.noobslab.com/2012/05/disable-ipv6-if-your-internet-is.html



This of course won't stop bind from blindly trying to use ipv6 though, so you also need to alter /etc/default/bind9 like so:



# run resolvconf? 
RESOLVCONF=yes
# startup options for the server
OPTIONS="-4 -u bind"


source: http://blog.evilcoder.net/disable-ipv6-on-bind9-linux/#sthash.U95y4s6U.dpuf


[#29418] Tuesday, July 6, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
guialk

Total Points: 300
Total Questions: 144
Total Answers: 121

Location: Saint Vincent and the Grenadines
Member since Sat, Sep 11, 2021
3 Years ago
;