Ubuntu – How to lock down connecting to a specific WiFi

networkingwireless

I have a laptop what has WiFi on the motherboard, but it only supports 802.11a/b and WEP. My WiFi network is 802.11n with WPA2-Personal. So I purchased a USB wireless stick that's compatible with my network. Now I have two wireless NICs. I am running Ubuntu 14.10 Desktop.

My network also has an open wireless network for guests which supports any security and so I think my motherboard's 802.11a/b NIC is connecting to my guest network randomly.

I'm finding that my laptop is wandering amongst all the possible connections.

  1. How can I disable the WiFi card on the motherboard?
  2. How can I set my USB wireless to connect using only a specific connection?

I didn't create all of the connections on the laptop and when I click on the wireless icon next to the system clock on my desktop, then Edit Connections, all of these connections don't show up so that I can delete/disable them. The one that does show up is the one that I want to connect to, but there isn't a setting to connect to it ONLY.

EDIT

lspci:

PCI (sysfs)  

*-network               
   description: Ethernet interface
   product: 88E8038 PCI-E Fast Ethernet Controller
   vendor: Marvell Technology Group Ltd.
   physical id: 0
   bus info: pci@0000:02:00.0
   logical name: eth0
   version: 14
   serial: 00:e0:b8:ba:47:13
   capacity: 100Mbit/s
   width: 64 bits
   clock: 33MHz
   capabilities: pm vpd msi pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd autonegotiation
   configuration: autonegotiation=on broadcast=yes driver=sky2 driverversion=1.30 latency=0 link=no multicast=yes port=twisted pair
   resources: irq:16 memory:c0200000-c0203fff ioport:a000(size=256)
*-network:0
   description: Wireless interface
   physical id: 2
   bus info: usb@1:6
   logical name: wlan0
   serial: 00:c0:a8:c7:d8:f5
   capabilities: ethernet physical wireless
   configuration: broadcast=yes driver=rtl8187 driverversion=3.16.0-31-generic firmware=N/A link=no multicast=yes wireless=IEEE 802.11bg
*-network:1
   description: Wireless interface
   physical id: 3
   bus info: usb@1:4
   logical name: wlan1
   serial: ac:9e:17:78:30:5b
   capabilities: ethernet physical wireless
   configuration: broadcast=yes driver=rtl8192cu driverversion=3.16.0-31-generic firmware=N/A ip=192.168.1.15 link=yes multicast=yes wireless=IEEE 802.11bgn

ifconfig:

eth0  Link encap:Ethernet  HWaddr 00:e0:b8:ba:47:13  
      UP BROADCAST MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
      Interrupt:16 

lo    Link encap:Local Loopback  
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:1409 errors:0 dropped:0 overruns:0 frame:0
      TX packets:1409 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:186218 (186.2 KB)  TX bytes:186218 (186.2 KB)

wlan0 Link encap:Ethernet  HWaddr 00:c0:a8:c7:d8:f5  
      UP BROADCAST MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan1 Link encap:Ethernet  HWaddr ac:9e:17:78:30:5b  
      inet addr:192.168.1.15  Bcast:192.168.1.255  Mask:255.255.255.0
      inet6 addr: fe80::ae9e:17ff:fe78:305b/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:4343 errors:0 dropped:0 overruns:0 frame:0
      TX packets:3875 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:1358691 (1.3 MB)  TX bytes:582676 (582.6 KB)

Best Answer

1) How can I disable the WiFi card on the motherboard?

To me that would be from BIOS. On-board devices should have an option to disable them.

2) How can I set my USB wireless to connect using only a specific connection?

Connections are only established with connection you provide a password for. If the guest network is strong and known it probably will pick this up. Dropping the password for it might be an option where you will need to manually input the password when you want to connect to it (and not safe the password).

Here is a method of disabling network manager for a specific MAC address: How can I make NetworkManager ignore my wireless card? You should be able to use this to make the guest network "un-managed" so Network Manager ignores it (another one about this).

Related Question