Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to disable network access until a reboot under Linux? I am interested in creating a Freedom equivalent for Linux (currently only available on Windows/Mac)

share|improve this question
3  
Relevant reading: blog.xkcd.com/2011/02/18/… –  Oliver Salzburg Mar 5 '12 at 17:10
    
very pertinent article –  bph Mar 5 '12 at 21:01
add comment

1 Answer

up vote 3 down vote accepted

Just open up a console and do an ifconfig to list your currently working network interfaces (if if says you can't see ifconfig, do /sbin/ifconfig instead). You should get a list much like...

eth0      Link encap:Ethernet  HWaddr 00:16:3E:67:93:05
          inet addr:192.168.2.127  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::216:3eff:fe67:9305/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3292579 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1916788 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1670865588 (1.5 GiB)  TX bytes:4208291745 (3.9 GiB)

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:16436  Metric:1
          RX packets:3170896 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3170896 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:201272471 (191.9 MiB)  TX bytes:201272471 (191.9 MiB)

In this case, if I wanted to disable traffic from the interface eth0, but wanted it to be active when I reboot, then type the command sudo ifconfig eth0 down, which will turn the interface off until reboot. If you want to bring it back up again, type sudo ifconfig eth0 up.

share|improve this answer
add comment

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.