Author Topic: [Help] How do I Create a Hotspot in Linux Mint with bridging?  (Read 3288 times)

0 Members and 1 Guest are viewing this topic.

Offline Conch

  • Serf
  • *
  • Posts: 44
  • Cookies: 8
  • ls -a /dev/null | grep Conch
    • View Profile
[Help] How do I Create a Hotspot in Linux Mint with bridging?
« on: October 02, 2012, 10:01:15 pm »
Basically, I'm on temporary internet at the moment and I'm connected to an access point which isn't in my own house.
I also have an Android netbook, the default networking/WiFi scanner in Android won't pick up the AP. So I want to bridge wlan0 (The hotspot) and wlan1 (The internet via AP)

I've done my research but I'm at an end, I've set up an Adhoc for wlan0 and set up ipv4 to connect computer to computer.

However when I connect to wlan0 (The hotspot) with my netbook it just disconnects, on Youtube, I was told by the author of the video an ethernet is required for the connection, I tried the ethernet but it just tries to link through eth0 instead of wlan0

I hope you guys can help me :)


Offline relax

  • Sir
  • ***
  • Posts: 562
  • Cookies: 114
  • The one and only
    • View Profile
Re: [Help] How do I Create a Hotspot in Linux Mint with bridging?
« Reply #2 on: October 03, 2012, 03:10:27 pm »
i have the same problem with my linux mint :(

Now i have fixed it

/home/relax/hostapd-test.conf
Code: [Select]
interface=wlan0
bridge=br0
driver=nl80211
country_code=SE
ssid=Relax-Mint
hw_mode=g
channel=6
wpa=2
wpa_passphrase=Hack-mY-WPA2-Password
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0

/etc/dhcp/dhcpd.conf

Code: [Select]
option domain-name-servers 83.233.79.36, 83.233.79.37;
option subnet-mask 255.255.255.0;

default-lease-time 3600;
max-lease-time 86400;
ddns-update-style none;

subnet 192.168.4.0 netmask 255.255.255.0 {
  range 192.168.4.129 192.168.4.254;
  option routers 83.233.238.52;
}
startAP.sh "sh startAP.sh wlan0 eth0"
Code: [Select]
#!/bin/bash
ifconfig $1 up 192.168.4.0 netmask 255.255.255.0
dhcpd $1 &
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables --table nat --append POSTROUTING --out-interface $2 -j MASQUERADE
iptables --append FORWARD --in-interface $1 -j ACCEPT
sysctl -w net.ipv4.ip_forward=1
hostapd /home/relax/hostapd-test.conf 1>/dev/null
killall dhcpd

/etc/dhcp/dhcpd.conf must be configured with your dns and route
« Last Edit: October 03, 2012, 04:09:32 pm by relax »

Offline Conch

  • Serf
  • *
  • Posts: 44
  • Cookies: 8
  • ls -a /dev/null | grep Conch
    • View Profile
Re: [Help] How do I Create a Hotspot in Linux Mint with bridging?
« Reply #3 on: October 03, 2012, 08:44:30 pm »
Awesome! Many thanks, Relax.
I'll try editing now and test the outcome.

Tack mycket bra.  ;D