Ubuntu 23.04 IPv6を無効にする方法

環境
Ubuntu 23.04

操作方法
1.設定内容を/etc/sysctl.confに保存します

# echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf

2.設定内容を反映します

# sysctl -p
net.ipv6.conf.all.disable_ipv6 = 1

3.IP確認

# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether 00:0c:29:8b:a6:ea brd ff:ff:ff:ff:ff:ff
    altname enp2s1
    inet 192.168.44.130/24 brd 192.168.44.255 scope global dynamic noprefixroute ens33
       valid_lft 1305sec preferred_lft 1305sec

 

Ubuntu 23.04

Posted by arkgame