Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

newbie here, for security best practice I want to disable IPV6 (not to deal with IPV6 firewall settings). I use Hetzner root server Ubuntu 12.04 . /etc/sysctl.conf file already have a setting from default Hetzner install and I added only last 3 row

# ipv6 settings (no autoconfiguration) This part come from defau install 
net.ipv6.conf.default.autoconf=0
net.ipv6.conf.default.accept_dad=0
net.ipv6.conf.default.accept_ra=0
net.ipv6.conf.default.accept_ra_defrtr=0
net.ipv6.conf.default.accept_ra_rtr_pref=0
net.ipv6.conf.default.accept_ra_pinfo=0
net.ipv6.conf.default.accept_source_route=0
net.ipv6.conf.default.accept_redirects=0
net.ipv6.conf.default.forwarding=0
net.ipv6.conf.all.autoconf=0
net.ipv6.conf.all.accept_dad=0
net.ipv6.conf.all.accept_ra=0
net.ipv6.conf.all.accept_ra_defrtr=0
net.ipv6.conf.all.accept_ra_rtr_pref=0
net.ipv6.conf.all.accept_ra_pinfo=0
net.ipv6.conf.all.accept_source_route=0
net.ipv6.conf.all.accept_redirects=0
net.ipv6.conf.all.forwarding=0
# I have added following myself
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

When I do netstat -tulpn still get udp6 and tcp6 results

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      1222/php-fpm.conf)
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      1019/mysqld
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1198/nginx
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      862/sshd
tcp6       0      0 :::80                   :::*                    LISTEN      1198/nginx
tcp6       0      0 :::22                   :::*                    LISTEN      862/sshd
udp        0      0 1XX.XX.XXX.XXX:123       0.0.0.0:*                           1241/ntpd
udp        0      0 127.0.0.1:123           0.0.0.0:*                           1241/ntpd
udp        0      0 0.0.0.0:123             0.0.0.0:*                           1241/ntpd
udp6       0      0 :::123                  :::*                                1241/ntpd

Do upd6 and tcp6 means still I have IPV6 enabled? Should I delete default Hetzner IPV6 settings? Thanks for all. Edit: I already did sysctl -p and I also tried rebooting.

share|improve this question
4  
Disabling IPv6 is exactly the opposite of a best practice. And firewalling it is trivial. –  Michael Hampton Sep 15 '13 at 15:40

1 Answer 1

up vote 0 down vote accepted

Log in as root or superuser. In the /etc/modprobe/aliases file, change this line :

alias net-pf-10 ipv6

To:

alias net-pf-10 off

Save the file and reboot the system.

share|improve this answer
    
Thans for your answer but Ubuntu 12.04 does not have /etc/modprobe/aliases file. –  Ocean Sep 15 '13 at 17:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.