Network manager start access point

7,291

You can try, using commands in the terminal.

You need at least: Wireless PCI or USB device connected to Linux with a/b/g and WPA2 support in AP mode, suppose it is wlan0 and Wired ethernet port connected to the upstream router for the Internet access, suppose it is eth0.

Open a terminal. (Ctrl+Alt+T).

Type the following command to install the application:

$ sudo -i
# apt-get update
# apt-get install hostapd bridge-utils

Now you must configure it by editing your file /etc/default/hostapd

$ sudo -i
# nano /etc/default/hostapd

Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration file:

DAEMON_CONF="/etc/hostapd/hostapd.conf"

Ctrl + O, save file. Ctrl + X, close nano.

Now you need to create the text file /etc/hostapd/hostapd.conf

sudo -i
nano /etc/hostapd/hostapd.conf

You must place these lines:

# Wireless network name - Set interface name

interface=wlan0

# Bridge name - set your bridge name

bridge=br0

# Driver nane - set driver name

driver=rtl8188eu

# Country name code - set country name code in ISO/IEC 3166-1 format. US = United Stats 

country_code=US

# SSID name - set your SSID

ssid=TameHog

# Operation mode - set operation mode a=IEEE 802.11a, b=IEEE 802.11b, g=IEEE 802.11g

hw_mode=g

# Channel number - set channel number

channel=3

# wpa mode - set wpa mode to 2

wpa=2

# wpa-passphrase - set your passphrase

wpa_passphrase=YourWiFiPassword

# Key management algorithms - set key and auth optionsmanagement

wpa_key_mgmt=WPA-PSK

# Set cipher suites - TKIP and CCMP = AES in Counter mode with CBC-MAC

wpa_pairwise=TKIP

rsn_pairwise=CCMP

# Shared Key Authentication

auth_algs=1

# Accept all MAC address 

macaddr_acl=0

Ctrl + O, save file. Ctrl + X, close nano.

Now you can setup wlan0 in standalone mode or bridge it with eth0

$ sudo -i
# nano /etc/network/interfaces

Modify or set config as follows:

auto lo br0

iface lo inet loopback

# wireless wlan0

allow-hotplug wlan0

iface wlan0 inet manual

# eth0 connected to the ISP router

allow-hotplug eth0

iface eth0 inet manual

# Setup bridge

iface br0 inet static

bridge_ports wlan0 eth0

address 10.160.10.11

netmask 255.255.255.0

network 10.160.10.0

#Isp Router IP, 10.160.10.2 also runs DHCPD

gateway 10.160.10.2

dns-nameservers 10.160.10.2

Ctrl + O, save file. Ctrl + X, close nano.

Reboot and make sure firewall is not blocking required ports:

$ sudo -i
# /sbin/iptables -L -n -v | less
Share:
7,291

Related videos on Youtube

TameHog
Author by

TameHog

Updated on September 18, 2022

Comments

  • TameHog
    TameHog over 1 year

    I have a pcDuino and I need to start a access point using network-manager. I know this can be done by creating a new connection and setting the mode to ap. It says that this mode is not supported but I know other people have done it. The driver included with the kernel is 8192cu. But running lshw -C network gives this:

      *-network:1
       description: Wireless interface
       physical id: 2
       bus info: usb@1:1
       logical name: wlan5
       serial: cc:d2:9b:5d:df:88
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=rtl8188eu ip=192.168.1.13 multicast=yes wireless=IEEE 802.11bgn
    

    Anyone know how I can set up a ap using network-manager?

  • TameHog
    TameHog over 9 years
    I have already tried this with the correct drivers but I cannot connect to the network it creates. I know I properly set up dhcpd and set the interface to static but regardless it does not connect
  • tripulse
    tripulse over 2 years
    That's not NetworkManager, it's a bare hostapd configuration.