Minimal network config [ wifi ]
Hi All
I am running Slackware 13.1 on my laptop. It's taken me a while to build knowledge of the various networking scripts and config files in order to connect to and switch between the various networks, home/work routers etc I have to deal with. While I am going places, I am still nowhere near mastery. Due to all the silliness of Wifi-tracking dustbins (http://arstechnica.com/security/2013...d-from-london/), Streetview wifi snarfing and general bad behaviour by Brothers, Big and Little, I am looking to start minimizing the wifi broadcasting that my system performs - in other words, I want to be able to totally disable my wifi system, at as low a level as reasonably possible, whenever I'm not using it, and bring it up on demand with a console command or two. To guarantee it is off during boot would be nice (so i can turn on the laptop at a cafe for example, and be sure not to do the default broadcast for routers and dhcp requests) I'm reasonably familiar with /etc/rc.d/rc.inet1.conf, the various ppp files, start and stop scripts etc. I must note that the hardware button for the wifi system is something I'd prefer not to mess with, as I'm afraid it will get stuck or broken too quickly, and it caused trouble with cross-os conflicts when I dual-booted. Software controls only please. Any ideas? |
Shouldn't be too difficult to do what you are wanting, if you don't mind doing it as root.
add to your /etc/rc.d/rc.local Code:
ifconfig wlan0 down Code:
ifconfig wlan0 up |
Keep It Simple Stupid. :) |
Hi and thanks to Whitewolf and kikinovak for your replies.
In terms of placing the ifconfig commands in rc.local: Surely this is too late, because when booting up, the system already tries to connect to wifi networks before rc.local runs. Maybe to guarantee no wifi on boot I need to edit something in /etc/rc.d/rc.inet1.conf or rc.wireless.conf before I shut down? In terms of upgrading and networkmanager - hehe - I don't call doing a full upgrade and installing extra packages 'keeping it simple', but I get your drift ;) Thanks again. |
I would just run
Code:
/etc/rc.d/rc.inet1 wlan0_stop Code:
/etc/rc.d/rc.inet1 wlan0_start That does not disable the radio on the wireless card but the card should not be scanning when the interface is down. Eric |
Quote:
|
Hi Alien_Bob
Will these commands keep the interface down on the next boot? Basically I want to be able to 'shut down wireless' before I pack up the laptop to travel, to make sure that when I boot it again (in an untrusted location) that it stays off, until I want to manually start it. Many thanks again to all |
Quote:
|
Quote:
Eric |
BTW, slackbuilds.org has a script to build NetworkManager for 13.1. I think 13.1 had wicd in /extra. Either of these will work and I think If you do a lot of roaming then it is much easier than creating a bunch of scripts for different locations.
Brian |
Quote:
|
Quote:
|
Quote:
The trouble is that supporting these two views leads to different design decisions, which is why I've tended to avoid GNU/Linux in general and particularly all the Windows/Mac desktop knock-offs (I think the people making these like your kind of user better than my kind). Slackware seems to strike a fairly good balance for a Linux distro from what I've seen so far (only been using it a couple months). The wireless configuration does look like a slight pain point though, based on thread count and my own initial experience with it. In the threads I saw, having NetworkManager in the system complicated matters, IMO, because posters would flail around from thing to thing and that added a 2nd way to work that distracted them from understanding the startup scripts and the programs involved at that level. |
Quote:
In my everyday work, I install Linux desktops mainly to a Joe-Sixpack-type of user, so even if it's Slackware and scripts and CLI under the hood, above the surface things look more like Mac OS X or Windows Seven (http://www.microlinux.fr/desktop_linux.php). Cheers, Niki |
This thread interests me because I'm new to laptops and especially wireless.
Please correct me if I'm wrong, but I was thinking a simple approach (for mobile laptops and not fixed workstations) is to 1) disable rc.networkmanager, 2) use an empty rc.inet1.conf, 3) modify rc.inet1 so only the lo interface starts, and 4) start eth0 and networkmanager after logging in. For me I'd have three basic NetworkManager options. Two would be for my home network: wired and wireless. I use static addresses in my home LAN and those two options already work nicely for me. I'm happily located in the remote rural boonies to avoid needing wireless encryption on my home router (keeps things a tad speedier :)). I need a third option for DHCP for when I'm on the road, which should also be configured to use encryption. NetworkManager is supposed to be "intelligent" to always first look for and prefer wired availability and then wireless. In my case that seems to work well for the home network but I haven't yet tested the DHCP option away from the home. Would this strategy succeed? |
In order to have complete manual control, just make /etc/rc.d/rc.inet1 and rc.inet2 non-executable. Then, create two small scripts which run the commands you need to start and stop the network services.
|
If rc.inet1 is chmod -x, then the lo interface never initializes during boot, which might affect other apps. I would think most people want lo to start automatically, most if not all the time?
|
Check the docs for your laptop.
Some have a Fn key or switch that can turn the wireless on and off. On my Dell 1545n, it's an Fn key; on my Asus, there's a switch on the front of the box just beneath the latch. |
Quote:
|
Hi All
Thanks for all the tips and possibilities. My preference is to stick with the stock slackware scripts and configs and work with that. If I have to edit rc.inet1.conf before I shut down (in order to guarantee no wifi on next boot) that is fine. I would appreciate however some tips on the least intrusive way to do this (ie. what key lines should I comment out/change/delete) and what might the greater consequences of this be. I'm mostly running on eth0, wired lan (and run local apache servers', so I need localhost), but occasionally travel and need to use public wifi or the home routers of friends (via wifi). Many Thanks! |
Just make rc.net1 non-executable to disable it on next boot.
"most people want lo to start automatically" I never had this behavior at all until recently when I started using a wireless router. I run a lot of the time as root, so I prefer to have networking setup as a completely manual operation, to avoid security risks. |
Thanks guys and girls, I'll be going gnashley's route and see how it goes.
Mark solved. |
All times are GMT -5. The time now is 09:39 PM. |