Skip to content

Instantly share code, notes, and snippets.

@ubinix-warun
Last active December 18, 2015 21:09
Show Gist options
  • Save ubinix-warun/5845562 to your computer and use it in GitHub Desktop.
Save ubinix-warun/5845562 to your computer and use it in GitHub Desktop.
Work on Ubuntu 13.04, Raspberry Pi Ref: www.pi-point.co.uk/documentation/
#ifconfig wlan0 192.168.1.1
cp /etc/dnsmasq.conf.bk /etc/dnsmasq.conf
#echo "interface=wlan0" > /etc/dnsmasq.conf
#echo "dhcp-range=192.168.1.5,192.168.1.254,255.255.255.0,12h" >> /etc/dnsmasq.conf
/etc/init.d/dnsmasq restart
rm hostapd.conf
#echo "interface=wlan0
#driver=nl80211
#ssid=xps-ubinix
#channel=1" > hostapd.conf
echo 0 > /proc/sys/net/ipv4/ip_forward
#iptables -t nat -A POSTROUTING -j MASQUERADE
killall hostapd
cp /etc/dnsmasq.conf /etc/dnsmasq.conf.bk
echo "interface=wlan0" > /etc/dnsmasq.conf
echo "dhcp-range=192.168.1.5,192.168.1.254,255.255.255.0,12h" >> /etc/dnsmasq.conf
/etc/init.d/dnsmasq restart
echo "interface=wlan0
driver=nl80211
ssid=xps-ubinix2
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=1234567890
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP" > hostapd.conf
#echo "interface=wlan0
#driver=nl80211
#ssid=xps-ubinix
#channel=1" > hostapd.conf
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -j MASQUERADE
hostapd -B ./hostapd.conf
ifconfig wlan0 192.168.1.1
#http://raspberry-at-home.com/installing-3g-modem/
wget http://raspberry-at-home.com/files/sakis3g.tar.gz
sudo apt-get install hostapd hostapd-utils dnsmasq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment