LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Madwifi ap slackware. (https://www.linuxquestions.org/questions/linux-wireless-networking-41/madwifi-ap-slackware-526236/)

Nille_kungen 02-06-2007 08:09 PM

Madwifi ap slackware.
 
Hi i'm trying to set up an AP with an atheros (AR5212) network card using madwifi (0.9.2.1) in slackware 11.0
I'm using an kernel i compiled myself 2.6.18.3
And i can't get it to work.

I get an error "ath0: not found" when i run 'dhcpd ath0'.

what i done so far is i made an rc.firewall.
Code:

modprobe ip_tables
modprobe ip_conntrack
modprobe ip_conntrack_ftp
modprobe ipt_state
modprobe iptable_nat
modprobe ipt_MASQUERADE


echo 1 > /proc/sys/net/ipv4/ip_forward



iptables --flush


iptables --table nat --flush
iptables --delete-chain


iptables --table nat --delete-chain


iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface ath0 -j ACCEPT

And i edited /etc/dhcpd.conf
Code:

# dhcpd.conf
#
# Configuration file for ISC dhcpd (see 'man dhcpd.conf')
#
ddns-update-style ad-hoc;
#ddns-update-style none;
subnet 192.168.1.0 netmask 255.255.255.0
{
range 192.168.1.2 192.168.1.254;
default-lease-time 720;
max-lease-time 86400;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 195.54.122.199 , 195.54.122.204; 
}

I also put 'dhcpd ath0' in /etc/rc.local.
And made an /etc/modprobe.d/madwifi including 'options ath_pci autocreate=ap'

Then 'iwconfig ath0 essid MyNet channel 4 rate 54M'

Code:

iwconfig ath0
ath0      IEEE 802.11g  ESSID:"MyNet"  Nickname:"mybox"
          Mode:Master  Frequency:2.412 GHz  Access Point: 00:0F:ED:F8:9E:69 
          Bit Rate=54 Mb/s  Tx-Power:16 dBm  Sensitivity=0/3 
          Retry:off  RTS thr:off  Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm
          Rx invalid nwid:1320  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0  Missed beacon:0

I don't know what i forgot or what i need to change.
But 'dhcpd ath0' won't work as i hoped.
And i want this to work before using hostapd for WPA2.

Nille_kungen 02-07-2007 04:58 AM

Now i got 'dhcpd ath0' to work.
I edited /etc/rc.d/rc.inet1.conf
Code:

IFNAME[4]="ath0"
IPADDR[4]="192.168.1.254"
NETMASK[4]="255.255.255.0"

But i can't reach the internet.
Not with domain or ip.
But i can 'ping 192.168.1.254'
I tried with 2 clients both failed.

Nille_kungen 02-07-2007 11:29 AM

I'm writeing this from an wireless client.
So everything works now.
I had an 2 default gateways one that shouldn't be there. (i saw it with 'route -n')

So i Deleted it with 'route del default gw 192.168.1.1'
Then traced how it accured and fixed it.

I know saw the sub section for wireless networking sorry for posting in wrong forum.


All times are GMT -5. The time now is 04:36 PM.