Hello and first of all I’m so sorry if there’s another thread like this, but I simply don’t have the time to search.
So let’s get to my question. I have two notebooks, but one of them don’t work without a battery. So I want to use it like a wifi router for the other one. On the broken one I’ve installed openSUSE 11.3 and plugged the LAN cable. So now it has Internet. My question is how to create a WLAN and use it like a router. Thanx!
Some information.
The wifi card is AR5007EG 802.11bg Wi-Fi mini PCI express card
The eth-card is RTL-8110SC/8169SC Gigabit Ethernet (eth0)
Hello and first of all I’m so sorry if there’s another thread like this, but I simply don’t have the time to search.
So let’s get to my question. I have two notebooks, but one of them don’t work without a battery. So I want to use it like a wifi router for the other one. On the broken one I’ve installed openSUSE 11.3 and plugged the LAN cable. So now it has Internet. My question is how to create a WLAN and use it like a router. Thanx!
Some information.
The wifi card is AR5007EG 802.11bg Wi-Fi mini PCI express card
The eth-card is RTL-8110SC/8169SC Gigabit Ethernet (eth0)
On 11/22/2010 02:36 PM, velkoto wrote:
>
> Hello and first of all I’m so sorry if there’s another thread like this,
> but I simply don’t have the time to search.
There is one, but I don’t have time to look up the reference.
On Mon, 22 Nov 2010 20:36:03 +0000, velkoto wrote:
> Hello and first of all I’m so sorry if there’s another thread like this,
> but I simply don’t have the time to search.
>
> So let’s get to my question. I have two notebooks, but one of them don’t
> work without a battery. So I want to use it like a wifi router for the
> other one. On the broken one I’ve installed openSUSE 11.3 and plugged
> the LAN cable. So now it has Internet. My question is how to create a
> WLAN and use it like a router. Thanx!
>
> Some information.
>
> The wifi card is AR5007EG 802.11bg Wi-Fi mini PCI express card
>
> The eth-card is RTL-8110SC/8169SC Gigabit Ethernet (eth0)
>
> Both working properly.
There’s no need to post in multiple forums.
Have a look at “masquerading”. I’ve not set it up myself, but that
should get you started (masquerading = NAT).
I’m also in the middle of my workday, so don’t really have time to write
a full walkthrough of how to do it - there are probably some excellent
howto guides out there that you’ll find now knowing what to search
for.
On 11/22/2010 07:06 PM, velkoto wrote:
>
> Sorry for the spam!
>
> I found this - ‘How to setup an Access Point’
> (http://tinyurl.com/3xapt68)
>
> Everything is perfect except the part with the DHCP. It says
> “Limited access” and that’s it.
I don’t understand. Please post the exact message and when it is output.
On 11/22/2010 07:06 PM, velkoto wrote:
>
> Sorry for the spam!
>
> I found this - ‘How to setup an Access Point’
> (http://tinyurl.com/3xapt68)
>
> Everything is perfect except the part with the DHCP. It says
> “Limited access” and that’s it.
For 11.3, you need to make some modifications:
#!/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=eth0
# 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
Or, as Larry points out in the first sentence of that tute, you could go out and get a wireless AP. A store here was getting rid of some old models for $8 the other day. You won’t find that price every day, but I think about $30 could get you one now. But maybe you don’t have stores like that or access to eBay where you are. Or you want to learn about setting Linux to do interesting things.
On 11/23/2010 07:06 AM, velkoto wrote:
>
> Thanks for the code, but still I have problems with the dhcp server.
>
> That’s what I see in Win7 [image:
> http://sphotos.ak.fbcdn.net/hphotos-ak-snc4/hs1220.snc4/155285_110266869043295_100001799463335_69603_3705949_n.jpg]
>
> When I run dhcpd in Konsole it shows “invalid option 66”. The code in
> dhcpd.conf is:
>
>
> Code:
> --------------------
> option domain-name-servers 192.168.1.1;
> default-lease-time 600;
> max-lease-time 7200;
> ddns-update-style none;
> ddns-updates off;
> authoritative;
> ldap-server “MY.IP.ADD.RESS”;
> ldap-port 389;
> ldap-ssl off;
> ldap-base-dn “ou=dnsdhcp,o=myOrg”;
> ldap-method static;
> ldap-debug-file “/var/log/dhcp-ldap-startup.log”;
> ldap-dhcp-server-cn “DHCP_ins1”;
> ldap-referrals on;
> 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;}
> --------------------
>
>
>
> P.S. when I try to create a DHCP server with YaST it also gives me an
> error [image: http://img338.imageshack.us/img338/1584/snapshot1n.jpg]
>
> The dhcpd version is 4.1.1-P1
Yes, Windows 7 fails the same way here, but openSUSE 11.3 can connect to the AP
created just fine. ATM, I cannot try Windows XP.
I’ve created a DHCP server, but now I have this error: Nov 23 18:13:30 linux-99kh dhcpd: DHCPINFORM from 192.168.0.100 via wlan0: not authoritative for subnet 192.168.0.0
How to make the other PC authorative?
Also that’s the log from the Konsole when I run dhcpd:
Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Wrote 1 leases to leases file.
No subnet declaration for br0 (MY.IP.ADD.RESS).
** Ignoring requests on br0. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface br0 is attached. **
Listening on LPF/wlan0/00:15:af:59:85:7c/192.168.0.0/24
Sending on LPF/wlan0/00:15:af:59:85:7c/192.168.0.0/24
No subnet declaration for eth0 (MY.IP.ADD.RESS).
** Ignoring requests on eth0. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface eth0 is attached. **
Sending on Socket/fallback/fallback-net
Win7 connects! DHCP works! In Win7 it says “Internet access”. Even Skype works! But…that’s it! For example I can’t open facebook.com?! ****, I can’t open anything! Only Skype works!!?!? WTF is wrong now!?