Wireless Army
This is a blog / tips and tricks website for web developers and security researchers.
follow us in feedly

Disable ipv6 via command line
by admin
 at 2017-09-03 23:05:00.

first do

to see if you are connected to witch network
if you are connected via cable it will be ethnumber (example: eth0 or eth1 or eth…) and wifi is wlannumber (wlan0 or wlan1 or wlan…)

eth0      Link encap:Ethernet  HWaddr 00:23:8b:cb:51:fa  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 `dropped` :0 overruns:0 frame:0
          TX packets:0 errors:0 `dropped` :0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:47 Base address:0xc000 

lo        Link encap:Local Loopback  
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:91 errors:0 `dropped` :0 overruns:0 frame:0
          TX packets:91 errors:0 `dropped` :0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:21865 (21.8 KB)  TX bytes:21865 (21.8 KB)

wlan0     Link encap:Ethernet  HWaddr 00:22:fa:cf:2c:7e  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe00::000:fcff:fecf:0c0e/64 Scope:Link 
          RX packets:1249 errors:0 `dropped` :0 overruns:0 frame:0
          TX packets:1243 errors:0 `dropped` :0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1220497 (1.2 MB)  TX bytes:208576 (208.5 KB)

in this example I’m connected to wlan0 because it’s wifi(i changed my ip addresses to 0 so for you it may look different)
if i

cat /proc/sys/net/ipv6/conf/wlan0/disable_ipv6

it will give me 0 because my ipv6 is enable so i do

echo 1 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6

now if i do

cat /proc/sys/net/ipv6/conf/wlan0/disable_ipv6

i will see 1
because it changed to 1 and my ipv6 is disable now
now if you do ifconfig you won’t see the line that was underlined previously