Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
Relevant reading:… – Oliver Salzburg Mar 5 '12 at 17:10
very pertinent article – bph Mar 5 '12 at 21:01
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:  Bcast:  Mask:
          inet6 addr: fe80::216:3eff:fe67:9305/64 Scope:Link
          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:  Mask:
          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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .