Eu estava tentando fazer uma interface virtual no meu cartão wlan1 (como set hostednetwork do windows) editando /etc/network/interfaces
:
auto wlan1:0
iface wlan1:0 inet static
address 192.168.4.1
netmask 255.255.255.0
wireless-mode ad-hoc
Quando isso falhou, tentei com ap-hotspot
:
sudo apt-get install ap-hotspot
cd /tmp && wget http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_i386.deb && sudo dpkg -i hostapd*.deb && sudo apt-mark hold hostapd
sudo ap-hotspot configure
Isso também falhou. Depois disso, instalei o padrão network-manager
e notei que consigo ver redes wi-fi, mas não consigo me conectar a elas. Eu tentei reinstalar drivers wlan e nada.
Vou fornecer algumas informações sobre como ele fica no meu sistema
sudo airmon-ng
Interface Chipset Driver
wlan1 Unknown iwlwifi - [phy0]
sudo gedit /etc/udev/rules.d/70-persistent-net.rules
# PCI device 0x8086:0x4237 (iwlwifi)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:d6:5f:8f:94", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan1"
Além disso, essa interface virtual wlan1: 0 fica parada no sistema e não é excluída por ifdown
sudo lshw -C network
*-network
description: Wireless interface
product: PRO/Wireless 5100 AGN [Shiloh] Network Connection
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan1
version: 00
serial: 00:24:d6:5f:8f:94
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=3.13.0-46-lowlatency firmware=8.83.5.1 build 33692 latency=0 link=no multicast=yes wireless=IEEE 802.11abgn
resources: irq:45 memory:90700000-90701fff
*-network
physical id: 2
logical name: mon.wlan1
sudo ifconfig
eth1
lo
mon.wlan1:0: error fetching interface information: Device not found
(note que eu removi eth1 e lo config para maior clareza). Mais informações sobre interfaces e driver:
:/sys/class/net$ ls -alh
total 0
drwxr-xr-x 2 root root 0 mar 14 2015 .
drwxr-xr-x 54 root root 0 mar 14 2015 ..
lrwxrwxrwx 1 root root 0 mar 14 20:11 eth1 -> ../../devices/pci0000:00/0000:00:1c.5/0000:03:00.0/net/eth1
lrwxrwxrwx 1 root root 0 mar 14 2015 lo -> ../../devices/virtual/net/lo
lrwxrwxrwx 1 root root 0 mar 14 20:11 mon.wlan1:0 -> ../../devices/pci0000:00/0000:00:1c.1/0000:02:00.0/net/mon.wlan1:0
lrwxrwxrwx 1 root root 0 mar 14 20:11 wlan1 -> ../../devices/pci0000:00/0000:00:1c.1/0000:02:00.0/net/wlan1
:lspci -vvnn | grep -A 9 Network
02:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 5100 AGN [Shiloh] Network Connection [8086:4237]
Subsystem: Intel Corporation WiFi Link 5100 AGN [8086:1311]
Physical Slot: 1
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 45
Region 0: Memory at 90700000 (64-bit, non-prefetchable) [size=8K]
Capabilities: <access denied>
Como posso me livrar dessa interface wlan1: 0 e fazer a wlan1 mostrar e funcionar?