How can I prevent my WLAN to use an essid?

Michele m.zarri at gmail.com
Wed Nov 14 07:46:09 UTC 2007


On Nov 14, 2007 2:43 AM, Rapael Morcha <raphael.morcha at gmail.com> wrote:

> On Tue, Nov 13, 2007 at 05:01:37PM +0100, Michele wrote:
> > Hello,
> >
> > Question 1:
> > As the subject says, I am in a location where two essids are available.
> I
> > would like to prevent my WLAN from switching to the "wrong" ESSID. is it
> > possible?
>
> Hi Michele,
> raphael at f9:[~] sudo ifdown eth1; sudo ifup eth1;
> raphael at f9:[~] sudo iwconfig eth1 essid <preferred-essid>;
>
> I'd put this nicely wrapped in a shell script in my desktop (So that I
> could double-click it and be able to execute it)
> ----wireless1.sh-------
> #!/bin/bash
>
> iwconfig eth1 essid <preferred-essid1>
> -----------------------
>
> raphael at f9:[~] sudo chmod +x wireless1.sh;
>
> raphael at f9:[~] sudo ~/Desktop/wireless1.sh;
> OR
> Double-click it in your desktop.
>
> Similar for wireless2.sh :-)
>
> > Question 2:
> > For the moment, I think I have found a way to select a preferred essid,
> > modifying the /etc/network/interfaces but my WLAN ignores this.
> > Here's the relevant part of my /etc/network/interfaces:
> >
> > auto eth1
> > #iface eth1 inet dhcp
> >
> > iface eth1 inet dhcp
> > wireless-essid <my preferred ESSID here>
> >
> > Should I comment "auto eth1" in the file above?
> auto eth1 means that it sets automatic settings for eth1 interface. The
> automatic settings are described in detail in 'man iwconfig'.
>
> I think there's a gnome applet available for managing all this through
>  graphical interface. Try adding that applet.
>
> --
> Cheers,
> Raphael.
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
Thanks Raphael,

The method you describe is the one I use (although I have to add commit at
the end otherwise my WLAN ignores me).
I was however looking for a way to create a kind of blacklist of networks.
At Heathrow airport for example you can get service from BTOpenzone,
tmobile, theCloud... and I want to select, say, tmobile. At home I want to
select my home WLAN essid rather than the one of my neighbour and so on...
In summary, my preferred essid is variable, while the list of unwanted essid
is fixed, so the script is not ideal (I would need as many as the locations
where I use WLAN)
Any idea?

Cheers,

Michele
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20071114/475edb55/attachment.html>


More information about the ubuntu-users mailing list