Close IPv6 under Ubuntu 16.04

Condition:

test@tvm:~/Documents$ uname -a
Linux tvm 4.10.0-28-generic #32~16.04.2-Ubuntu SMP Thu Jul 20 10:19:48 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
test@tvm:~/Documents$ ifconfig
ens33 Link encap:Ethernet HWaddr 00:0c:29:0d:d7:c2
inet addr:192.168.206.226 Bcast:192.168.206.255 Mask:255.255.255.128
inet6 addr: 2001:da8:e800:d40c:1448:5047:51d0:5c86/64 Scope:Global
inet6 addr: fe80::f6ec:1e75:a4d5:864a/64 Scope:Link
inet6 addr: 2001:da8:e800:d40c:ed92:e59f:6f36:a462/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:59571 errors:0 dropped:1 overruns:0 frame:0
TX packets:21332 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:68996443 (68.9 MB) TX bytes:1601507 (1.6 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:534 errors:0 dropped:0 overruns:0 frame:0
TX packets:534 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:45796 (45.7 KB) TX bytes:45796 (45.7 KB)

Edit:

test@tvm:~/Documents$ sudo vim /etc/sysctl.conf

Add those configuration in the last line of the conf file:
# IPv6 disabled
net.ipv6.conf.all.disable_ipv6 =1
net.ipv6.conf.default.disable_ipv6 =1
net.ipv6.conf.lo.disable_ipv6 =1

Restart sysctl

sudo sysctl -p

Check configuration again

ifconfig

test@tvm:~/Documents$ ifconfig
ens33 Link encap:Ethernet HWaddr 00:0c:29:0d:d7:c2
inet addr:192.168.206.226 Bcast:192.168.206.255 Mask:255.255.255.128
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:66989 errors:0 dropped:1 overruns:0 frame:0
TX packets:21870 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:69493888 (69.4 MB) TX bytes:1676023 (1.6 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:600 errors:0 dropped:0 overruns:0 frame:0
TX packets:600 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:51524 (51.5 KB) TX bytes:51524 (51.5 KB)