I plan to turn my Laptop into an Access Point with www access, but it just won’t work! :’(
Here are my config-files…
/etc/hostapd.conf
interface=wlan0
#bridge=br0
driver=nl80211
hw_mode=g
channel=6
ssid=AR5008
I want an unencrypted connection! Everybody can connect to my AP :shame:
/etc/dhcpd.conf
option domain-name-servers 192.168.1.1;
default-lease-time 600;
max-lease-time 7200;
ddns-update-style none; ddns-updates off;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.200 192.168.0.229;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
#option routers 192.168.0.1;
option routers 10.0.0.138;
}
And here is the script I’m using to activate the SoftAP:
#!/bin/sh
# Script to start/stop a hostapd-based access point
#
# Symbols for needed programs
IPTABLES=/usr/sbin/iptables
IFCONFIG=/sbin/ifconfig
DHCPD=/usr/sbin/dhcpd
HOSTAPD=/usr/sbin/hostapd
# Symbols for internal and external interfaces
NET_INT=wlan0
NET_EXT=dsl0
# IP address for the AP
INT_ADDR=192.168.0.1
case "$1" in
start)
echo "Starting AP mode for $NET_INT at address $INT_ADDR"
# Disable packet forwarding
echo 0 > /proc/sys/net/ipv4/ip_forward
# Stop any existing hostapd and dhcpd daemons
killproc hostapd
killproc dhcpd
#Set up forwarding
$IPTABLES -t nat -A POSTROUTING -o $NET_EXT -j MASQUERADE
$IPTABLES -A FORWARD -i $NET_EXT -o $NET_INT -m state \
--state RELATED,ESTABLISHED -j ACCEPT
$IPTABLES -A FORWARD -i $NET_INT -o $NET_EXT -j ACCEPT
# Enable packet forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
# Get the internal interface in the right state
$IFCONFIG $NET_INT down
$IFCONFIG $NET_INT up
$IFCONFIG $NET_INT $INT_ADDR
# dhcpd needs to have a leases file available - create it if needed
if ! -f /var/lib/dhcp/db/dhcpd.leases ]; then
touch /var/lib/dhcp/db/dhcpd.leases
fi
# Bring up the DHCP server
$DHCPD -cf /root/dhcpd.conf $NET_INT
# Bring up hostapd
$HOSTAPD -B /root/hostapd.conf
;;
stop)
echo "Stopping AP mode on $NET_INT"
# Stop hostapd and dhcpd daemons
killproc hostapd
killproc dhcpd
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
I found this script here: http://forums.opensuse.org/english/get-help-here/wireless/410475-how-setup-access-point.html
The AP works, but I only can browse Samba Shares from other devices, they don’t have Internet Access >:(
Example: I have an Archos 101 G9 Turbo, from this device I can access all my Samba Shared, works 100%, but if I open a browser, endless loading (5 min.) than an error that there is no internet connection.
I tried to create a bridge:
brctl addbr br0
brctl addif br0 wlan0
brctl addif br0 dsl0
can't add dsl0 to bridge br0: Invalid argument
Here is the main problem, if I add eth0 to the bridge, my laptop losses the internet connection, because I only can connect via dsl0 interface to the internet.
I have to remove the bridge completely to get back my internet connection, if eth0 is in the bridge.
I have an Alcatel (Thomson) SpeedTouch 510 DSL modem
The provider is AON (AonSpeed/Austria) | Yes, I live in Austria.
The only Linux distro that seems to support this type of modem is openSUSE.
The only program that can connect to the modem is KInternet from the KDE3 desktop
I’m confused!
Here are some system specs:
WLAN: AR5008 Wireless Network Adapter by Atheros Communications Inc.
LAN: 88E8040T PCI-E Fast Ethernet Controller by Marvell Technology Group Ltd.
Btw, the script creates an interface: mon.wlan0 (Wired)
wlan0 is Wireless.
Here are some details of the modem:
IP: 10.0.0.138
Gateway: 10.0.0.140
PPP Mode: Point to Point Tunneling Protocol
Basic Information
Region: Austria
Provider: Telekom Austria AG
Service Name: Broadband Access
Service Description: Austria
IP address table
eth0 10.0.0.13/24 Type: Extra
loop 127.0.0.1/8 Type: Auto
IP route table
10.0.0.0/24 10.0.0.0/24 10.0.0.138 eth0
255.255.255.255/32 any 10.0.0.138 eth0
10.0.0.138/32 any 10.0.0.138 eth0
127.0.0.1/32 any 127.0.0.1 loop
10.0.0.0/24 any 10.0.0.138 eth0
224.0.0.0/4 any 10.0.0.138* eth0
default any not specified* DIALUP_PPP1
default any 10.0.0.138* eth0
Is there any hope for me to create an SoftAP w/ Internet Connection?
Or is my plan ********** :mad:
I really need help!