LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-02-2008, 05:26 AM   #1
chaz_bro1972
Member
 
Registered: Jul 2006
Location: Oklahoma, USA
Distribution: Slackware64-Current, Multilib
Posts: 242

Rep: Reputation: 27
How do I manually disconnect/reconnect DHCP DSL internet connection?



Hi.

I am on a wired only home network with 3 other PC's. Of the three PC's, only one runs Linux full time: mine. Needless to say I am extremely worried about security for the entire network (that's why it's a wired connection as opposed to a wireless connection). If it is possible at all, I would like some way of disconnecting (and reconnecting) my PC from the internet connection, without disconnecting any wires from the router (ie. via software). Is this possible with Linux?

PS. Please do not turn this into a flame war on "why wireless internet is better," or "wireless internet is secure." I'm sticking with my wired connection, and that is that. Please stay on target with this thread. Thank you.
 
Old 06-02-2008, 05:34 AM   #2
puntjuh
Member
 
Registered: Apr 2006
Location: holland
Distribution: Gentoo / debian / suse / mint
Posts: 558

Rep: Reputation: 42
To deactivate your network card. Just type: ifconfig eth0 down

eth0 depends... DO:

ifconfig

to find out what nic's you have enabled, and which name they have. Then disable them.
 
Old 06-02-2008, 05:39 AM   #3
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
What distro?

On many distros (like Debian), you just get the root user to do:
ifdown eth0
ifup eth0

Worst case (this will work on all distros):
ifconfig eth0 down
ifconfig eth0 up

If you're really keen, you can probably hack an "ethernet on demand" program ...

Switching to 'root' all the time to bring the interface down and up is probably a bigger security threat than the internet. I'm sure a lot of us reading this post are wondering if you really know what you're doing. This isn't WinDuhs - if you're not running services, the only thing to worry about is phishing when using a web browser. Well, that and a fatal flaw in the Linux network drivers. Or a remotely exploitable flaw in the browser.

Last edited by pinniped; 06-02-2008 at 05:40 AM.
 
Old 06-02-2008, 05:49 AM   #4
marsguy
Member
 
Registered: Nov 2004
Distribution: Red Hat Enterprise & SuSe 10
Posts: 77

Rep: Reputation: 15
I think that "chaz_bro1972" wants to disconnect his internet connection only, not the Whole ethernet connection.

am I correct "chaz_bro1972"?
 
Old 06-02-2008, 06:12 AM   #5
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
What are you running on your other 2 PC's that you are only worried about the one running Linux part time? Slackware is more secure than winbloze any day.

Now for the obligatory: (wireless internet sucks! let the flames begin....!!!!)
 
Old 06-02-2008, 07:36 AM   #6
chaz_bro1972
Member
 
Registered: Jul 2006
Location: Oklahoma, USA
Distribution: Slackware64-Current, Multilib
Posts: 242

Original Poster
Rep: Reputation: 27
Quote:
Originally Posted by marsguy View Post
I think that "chaz_bro1972" wants to disconnect his internet connection only, not the Whole ethernet connection.

am I correct "chaz_bro1972"?
Quite right, marsguy.
 
Old 06-02-2008, 07:43 AM   #7
chaz_bro1972
Member
 
Registered: Jul 2006
Location: Oklahoma, USA
Distribution: Slackware64-Current, Multilib
Posts: 242

Original Poster
Rep: Reputation: 27
Quote:
Originally Posted by Randux View Post
What are you running on your other 2 PC's that you are only worried about the one running Linux part time? Slackware is more secure than winbloze any day.

Now for the obligatory: (wireless internet sucks! let the flames begin....!!!!)
The three PC's are running the following OS's:

1)My wife's PC: Win XP (even she doesn't want Vista - thank God!)
2)My daughter's PC: Dual-booting Win 2000 Pro & Slackware 12.0
3)My PC: Slackware 12.0 (tried 12.1, didn't work quite right on my old hardware)

I'm afraid that whatever bug the Windbloze PC's got might transfer over. Some geek at Microsoft might be writing a Linux virus. They probably write so many of their own viruses they definitely have the practice.
 
Old 06-02-2008, 07:45 AM   #8
lsteacke
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 99

Rep: Reputation: 16
One of the perks of having a high bandwidth connection is that you don't have to disconnect and reconnect constantly when you want internet access. In this respect, there ways to mimic this functionality but they all basically involve disabling your network card, or stopping networking services on your box. As it was said before, bringing down your interface will do the trick.

Code:
ifdown eth0
or how about

Code:
etc/rc.d/rc.inetd stop
 
Old 06-02-2008, 07:51 AM   #9
chaz_bro1972
Member
 
Registered: Jul 2006
Location: Oklahoma, USA
Distribution: Slackware64-Current, Multilib
Posts: 242

Original Poster
Rep: Reputation: 27
Quote:
Originally Posted by lsteacke View Post
One of the perks of having a high bandwidth connection is that you don't have to disconnect and reconnect constantly when you want internet access. In this respect, there ways to mimic this functionality but they all basically involve disabling your network card, or stopping networking services on your box. As it was said before, bringing down your interface will do the trick.

Code:
ifdown eth0
or how about

Code:
etc/rc.d/rc.inetd stop
Soooooo.... if this stops the access to the net for MY PC only:

Code:
etc/rc.d/rc.inetd stop
Does this bring it back?:

Code:
etc/rc.d/rc.inetd start
 
Old 06-02-2008, 08:26 AM   #10
Tux-Slack
Member
 
Registered: Nov 2006
Location: Slovenia
Distribution: Slackware 13.37
Posts: 511

Rep: Reputation: 37
Or you could just bring down the gateway... this will disconnect you as well.
 
Old 06-02-2008, 08:50 AM   #11
chaz_bro1972
Member
 
Registered: Jul 2006
Location: Oklahoma, USA
Distribution: Slackware64-Current, Multilib
Posts: 242

Original Poster
Rep: Reputation: 27
"ifconfig eth0 down" disconnects me, but "ifconfig eth0 up" does not reconnect me. I can only reconnect after reboot. "etc/rc.d/rc.inetd stop" doesn't work at all, and "etc/rc.d/rc.inetd start" does not either.

Anymore suggestions?
 
Old 06-02-2008, 08:53 AM   #12
chaz_bro1972
Member
 
Registered: Jul 2006
Location: Oklahoma, USA
Distribution: Slackware64-Current, Multilib
Posts: 242

Original Poster
Rep: Reputation: 27
Quote:
Originally Posted by Tux-Slack View Post
Or you could just bring down the gateway... this will disconnect you as well.
Interesting... How do I do this?
 
Old 06-02-2008, 08:55 AM   #13
Tux-Slack
Member
 
Registered: Nov 2006
Location: Slovenia
Distribution: Slackware 13.37
Posts: 511

Rep: Reputation: 37
One thing I don't undestand tho.
Your computer acts as a router for the windows boxes?

ip route del default via gatewayIP dev eth0(may differ)
ip route add default via gatewayIP dev eth0(same as above)

if this is a router for your windows machines it will bring them down as well.
 
Old 06-02-2008, 08:59 AM   #14
chaz_bro1972
Member
 
Registered: Jul 2006
Location: Oklahoma, USA
Distribution: Slackware64-Current, Multilib
Posts: 242

Original Poster
Rep: Reputation: 27
Quote:
Originally Posted by Tux-Slack View Post
One thing I don't undestand tho.
Your computer acts as a router for the windows boxes?

ip route del default via gatewayIP dev eth0(may differ)
ip route add default via gatewayIP dev eth0(same as above)

if this is a router for your windows machines it will bring them down as well.
Ummm? I don't think so. We are all connected to a physical wired router. The only thing we share is internet (as far as I know).
 
Old 06-02-2008, 07:46 PM   #15
chaz_bro1972
Member
 
Registered: Jul 2006
Location: Oklahoma, USA
Distribution: Slackware64-Current, Multilib
Posts: 242

Original Poster
Rep: Reputation: 27
Confirmed:

All the other PC's connected to the router are independent of each other. The DSL modem is attached to the router. The router's power comes from the power bar that my PC is also attached to, but my PC does not need to be turned on to allow the others internet access.

So, to clarify, the DSL modem is attached to the router, and the three PC's are attached to the router (via their own network card), giving the three PC's internet access. Isn't this way the right way to do it?

Let me ask again:

1) "ifconfig eth0 down" drops the net from my PC <===solved
2) "ifconfig eth0 up" does NOT reconnect me <===unsolved

Further help is still needed.
 
  


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
USB Keybooard/Mouse disconnect/reconnect issue (Genius TwinTouch Optical Office) 2Pacalypse Linux - Hardware 0 09-22-2007 05:06 AM
Disconnect an Windows internet connection taro83 Linux - Networking 10 04-09-2007 10:29 AM
Mount / unmount / ejecting CD/DVD makes LAN disconnect & reconnect...! GrapefruiTgirl Slackware 9 03-06-2007 10:48 PM
Internet connection drops how to reconnect a file transfer jspsandhu Linux - Networking 2 06-21-2005 04:43 PM
Can't reconnect internet when connection has lost Mikessu *BSD 1 06-18-2004 06:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:06 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