0

I want to know how to share wireless connection and create a wireless hotspot.

On Windows i use "netsh wlan set hostednetwork mode=allow ssid=myssid pass=mypass". And then "netsh wlan start hostednetwork".

ubuntu 14.04 64-bit dual-booted with windows 7.

Thanks.

Alik
  • 41
  • 1
  • 2
  • 3

2 Answers2

1

Test this:

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.

Press 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
kyodake
  • 15,052
  • 3
  • 40
  • 48
0

There is a really nice explanation on the german wiki. The automatic translation is not that great, but I find it understandable, so it might point you in the right direction anyways:

https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Fwiki.ubuntuusers.de%2FWLAN_Router&edit-text=&act=url

ApolloLV
  • 483
  • 2
  • 7