LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-10-2010, 04:14 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
Disconnecting from the internet.


kernel 2.6.21.5, GNU (Slackware 12.0).

Hi:
Is there a way to disconnect my machine from the internet? I mean, by a software command. Even better if this command physically isolates me from internet. Please assume I'm not running a GUI. Thanks in advance.
 
Old 08-10-2010, 04:18 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Look at the ifconfig command (man ifconfig). This will tell you how to disconnect from the network. Also look at unplugging your network cable...
 
1 members found this post helpful.
Old 08-10-2010, 04:18 PM   #3
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 99
route del -net 0.0.0.0 netmask 255.255.255.255

Running this will remove your default route, so you will still be
connected to your lan, but won't connect to the Internet.
 
1 members found this post helpful.
Old 08-10-2010, 05:54 PM   #4
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Thanks a lot.
 
Old 08-10-2010, 06:29 PM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Quote:
Originally Posted by XavierP View Post
Look at the ifconfig command (man ifconfig). This will tell you how to disconnect from the network. Also look at unplugging your network cable...
I did 'ifconfig eth0 down' and I got disconnected. Later on, I did 'ifconfig eth0 up' but this didn't reconnect me. Can you explain? (I do not have a router.)
 
Old 08-10-2010, 08:10 PM   #6
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
After running ifconfig do
Code:
dhcpcd eth0
That should query for an IP address. If it doesn't, just run ifconfig on it's own to see what your network cards are doing.
 
1 members found this post helpful.
Old 08-10-2010, 08:28 PM   #7
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Thanks XavierP.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SME 7.4 Server disconnecting from internet graywolf Linux - Server 2 12-21-2009 12:31 PM
app for connecting/disconnecting the internet navarre9 Linux - Software 4 03-31-2009 07:41 AM
Why does my internet connection keep disconnecting? orwell General 5 07-07-2006 08:52 AM
Atheros AR5001X + Wireless Adapter keeps disconnecting from the internet sailor94563 Linux - Wireless Networking 1 01-16-2006 04:13 PM
disconnecting shared internet hyperriven Linux - Networking 1 05-06-2004 03:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration