How to turn off the LAN access while I'm away?

Booting, installing, newbie
Post Reply
Message
Author
singlewc
Posts: 29
Joined: Wed 22 Nov 2006, 20:36

How to turn off the LAN access while I'm away?

#1 Post by singlewc »

I am using Puppy (very impressed) at the moment, from the CD.

In windows (can I say that here? <g>) I can easily disconnect the machine from the internet/comcast cable modem, with the old right click on the lan icon, and 'disable.' The same thing to re-enable when I want to.

In Puppy, I have the firewall on and all, but I don't like leaving it connected as the machine is on day, even when I am out. Is there a simply method to do the enable-disable LAN" with PuppyLinxux? I would like to have such an 'on-off' switch on the desktop if I can.

Thanks a lot

marksouth2000
Posts: 622
Joined: Wed 05 Apr 2006, 20:43

#2 Post by marksouth2000 »

The commands are only

Code: Select all

# ifconfig eth0 down
and

Code: Select all

ifconfig eth0 up
You could put these into scripts and add icons for them. As a slightly harder exercise, put them together in one script that just Does The Right Thing :)

If you turn out to be connecting by wireless and forgot to mention it, the scripts get a little more complicated.

But I'm also curious to know what you are afraid your machine might get up to while you're out? Or does Steve Balmer come and drop subpoenas on your desk if he finds you running Linux? Gremlins???

Cheers,
Mark

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#3 Post by sunburnt »

Hi singlewc; Yep... Mark beat me to it (curses, foiled again!).

What you need now is a DeskTop icon, that runs the Bash code above.
Clicking the icon would toggle the NIC on & off.
It'd be nice if the icon changed to indicate if the NIC is on or off.

As you can probably tell, I've thought about just such a utility.
If you need more help... just ask & someone will assist.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#4 Post by Flash »

Perhaps this is something that ought to be added to Blinky's right-click menu.

User avatar
Gn2
Posts: 943
Joined: Mon 16 Oct 2006, 05:33
Location: virtual - Veni vidi, nihil est adpulerit

#5 Post by Gn2 »

Some prefer (old fashioned) way: ~ plug modem power switch into toggle controlled outlet.

(Wizards_are_Wonderful, yet poor Sub. for lapses of memory) ?

Besides, power outages cause more dang grief than unlikely event of Trojans !

marksouth2000
Posts: 622
Joined: Wed 05 Apr 2006, 20:43

#6 Post by marksouth2000 »

Sunburnt: heheh :wink:

Flash: good idea :idea:

Gn2: well, if you want to be old fashioned and low tech about it there's no fun left in it, is there now? :D

Mark 8)

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#7 Post by pakt »

Gn2 wrote:Some prefer (old fashioned) way: ~ plug modem power switch into toggle controlled outlet.
In my neck of the woods, it's better to unplug the modem's phone line connection -> avoid lightning-zapped modem ;)
Methinks Raspberry Pi were ideal for runnin' Puppy Linux

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#8 Post by PaulBx1 »

Unfortunately, Mark's fix does not work for wifi. Mine, anyway. :(

marksouth2000
Posts: 622
Joined: Wed 05 Apr 2006, 20:43

#9 Post by marksouth2000 »

Taking the ethernet down should stop any traffic on the interface, even if the card is still associated to the access point. "ifconfig iface down" should rip out the IP address.

So, what happens in your case, Paul? I'm curious now.

Mark 8)

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#10 Post by PaulBx1 »

Oh, the "down" works just fine. It's getting back up that is the problem. I do the "up", and it's as if nothing happens. Ifconfig does not show wlan0.

However my wireless is kinda weird anyway, so it might be specific to my setup.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#11 Post by Flash »

When you take down the interface, maybe your ISP removes the IP address. Perhaps when you bring the interface back up you need to ask the DHCP server for a new IP address.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#12 Post by sunburnt »

Flash; My thought exactly, & easy for PaulBx1 to test.

In Xterm just type: dhcpcd

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#13 Post by PaulBx1 »

Nope. Nor does it work when I delete the appropriate .pid file first.

I actually do get wlan0 back (in the "ifconfig" command) after bringing it back up (just checked), along with an IP address. It just doesn't communicate.

I don't particularly want to chase this down. This is functionality that I don't need that much at the moment, and I may go to different wireless hardware which will make any such troubleshooting moot. The real problem I have right now is getting wireless and pup_save encryption to work AT ALL in 2.12; until then I am stuck with 2.11.

singlewc
Posts: 29
Joined: Wed 22 Nov 2006, 20:36

#14 Post by singlewc »

marksouth2000 wrote:
But I'm also curious to know what you are afraid your machine might get up to while you're out? Or does Steve Balmer come and drop subpoenas on your desk if he finds you running Linux? Gremlins???

Cheers,
Mark
Thanks, I will give the scripts a try.

As for the why? Its not a fear of Microsoft :-) Its mostly known as young teenage children..... It is by no means a real secure method, but it confounds them enough to just not bother with Dad's machine for the internet. On windwoes, a bit of effort would get them on. In Puppy Linux, using such scripting, there is pretty much no chance they will get it connected again :-)

I could just use a password on my machine, but then I can't just fire it up, go get some coffee and come back to a machine ready to go.....

Hardly the best solution, but I consider it worth doing as a matter of principle more than anything else.

I do wish there was a method to specifically password protect thebroadband access..... Well, I guess there probably is, but I don't know about it. <shrug>

Much obliged,

John

Braden
Posts: 69
Joined: Fri 22 Sep 2006, 20:39
Location: Waterloo, Ontario, Canada

#15 Post by Braden »

One can lock the running session with a password, and it doesn't require you to have a log in screen on bootup. That's a relatively painless defense against children/coworkers/cats.
There's a lock icon in the top-right of the Puppy desktop by default.
I think you need to set a password first, for that go into a console and type "passwd", then enter your password twice.

Post Reply