LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-18-2006, 10:10 AM   #1
samel_tvom
Member
 
Registered: Aug 2004
Posts: 133

Rep: Reputation: 15
problem "creating" an access point with dnsmasq


Hello!

I have just purchased a D-link DWL-G520 wireless card. It works with madwifi.
It can connect to my netgear accesspoint/router and everything is fine.

Now I want this card to be an access point. So I do the following:
Code:
#iwconfig ath0 mode Master
#iwconfig ath0 essid "HAXX"
#ifconfig ath0 10.0.0.1
And then I can find it with my laptop (which also can connect to my netgear AP)
So far so good, now I just have to configure dnsmasq (or so he thought...)

My dnsmasq.conf looks like this:

Code:
resolv-file=/etc/resolv.conf
no-poll
domain-needed
bogus-priv
strict-order

interface=ath0
interface=eth1

dhcp-range=192.168.0.10,192.168.0.50,12h
dhcp-range=10.0.0.10,10.0.0.100,12h

dhcp-host=00:0A:E4:52:6B:12,alice
dhcp-host=00:40:CA:45:10:9C,bob

dhcp-authoritative
And the output from ifconfig looks like:
Code:
root@force:~# ifconfig 
ath0      Link encap:Ethernet  HWaddr 00:15:E9:30:8C:4A  
          inet addr:10.0.0.1  Bcast:10.255.255.255  Mask:255.0.0.0
          inet6 addr: fe80::215:e9ff:fe30:8c4a/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1492  Metric:1
          RX packets:192 errors:689383 dropped:0 overruns:0 frame:689383
          TX packets:8 errors:282 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:200 
          RX bytes:104152 (101.7 KiB)  TX bytes:1648 (1.6 KiB)
          Interrupt:5 Memory:c8b40000-c8b50000 

eth0      Link encap:Ethernet  HWaddr 00:40:CA:1C:97:77  
          inet addr:85.235.31.133  Bcast:85.235.31.255  Mask:255.255.255.0
          inet6 addr: fe80::240:caff:fe1c:9777/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:517621 errors:0 dropped:0 overruns:0 frame:0
          TX packets:72772 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:69874515 (66.6 MiB)  TX bytes:70195546 (66.9 MiB)
          Interrupt:11 Base address:0x1080 

eth1      Link encap:Ethernet  HWaddr 00:90:27:5C:A0:5A  
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::290:27ff:fe5c:a05a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:263787 errors:0 dropped:0 overruns:0 frame:0
          TX packets:723590 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:45560011 (43.4 MiB)  TX bytes:762141527 (726.8 MiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:72953 errors:0 dropped:0 overruns:0 frame:0
          TX packets:72953 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:21471070 (20.4 MiB)  TX bytes:21471070 (20.4 MiB)
So I thought everything was tiptop. On the AP I issue
Code:
#dnsmasq -d
When I try to connect to the AP with my laptop by doing

Code:
#iwconfig wlan0 essid "HAXX"
#dhcpcd wlan0 (have tried dhclient as well)
I get no ip, but the AP gives:

Code:
root@force:/var/lib/misc# dnsmasq -d
dnsmasq: started, version 2.22 cachesize 150
dnsmasq: DHCP, IP range 10.0.0.10 -- 10.0.0.100, lease time 12h
dnsmasq: DHCP, IP range 192.168.0.10 -- 192.168.0.50, lease time 12h
dnsmasq: read /etc/hosts - 12 addresses
dnsmasq: reading /etc/resolv.conf
dnsmasq: using nameserver 81.88.9.220#53
dnsmasq: using nameserver 81.88.9.218#53
dnsmasq: DHCPDISCOVER(ath0) 00:0e:2e:3f:37:f5
dnsmasq: DHCPOFFER(ath0) 10.0.0.10 00:0e:2e:3f:37:f5
dnsmasq: DHCPDISCOVER(ath0) 00:0e:2e:3f:37:f5
dnsmasq: DHCPOFFER(ath0) 10.0.0.10 00:0e:2e:3f:37:f5
dnsmasq: DHCPDISCOVER(ath0) 00:0e:2e:3f:37:f5
dnsmasq: DHCPOFFER(ath0) 10.0.0.10 00:0e:2e:3f:37:f5
It looks like the AP tries to offer the ip but somehow it doesn't work. I know that it's nothing wrong on the client side, because if issue the command on the client(laptop):
Code:
#iwconfig wlan0 essid "NETGEAR"
#dhcpcd wlan0
I get an ip.

What's wrong, how should I fix it?

Thanks!
 
Old 01-12-2008, 07:59 PM   #2
amocjr
Member
 
Registered: Aug 2003
Location: Connecticut
Distribution: Mandrake, Debian
Posts: 39

Rep: Reputation: 15
Did you ever solve this? I'm having a very similar problem, but with wired clients. If you did solve it, your solution would be appreciated.
 
Old 01-13-2008, 11:08 AM   #3
samel_tvom
Member
 
Registered: Aug 2004
Posts: 133

Original Poster
Rep: Reputation: 15
Hi there,

Don't know if it'll help 'cause I don't use the card as a connectionpoint anymore. But when I did, I had things set up something like this:
Code:
ifconfig ath0 down
ifconfig wifi0 down
wlanconfig ath0 destroy
wlanconfig ath0 create wlandev wifi0 wlanmode ap
iwconfig ath0 essid FreeNet
ifconfig ath0 192.168.1.1 up
My firewall settings are:
Code:
IPTABLES='/sbin/iptables'
EXTIF='eth0'
INTIF='eth1'
WLAN='ath0'
WAN='85.24.184.122'
        /bin/echo 1 > /proc/sys/net/ipv4/ip_forward

        $IPTABLES -F
        $IPTABLES -X

        $IPTABLES -X -t nat
        $IPTABLES -F -t nat

        $IPTABLES -X -t filter
        $IPTABLES -F -t filter

        # enable masquerading to allow LAN internet access
        $IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE

        # forward LAN traffic from $INTIF1 to Internet interface $EXTIF
        $IPTABLES -A FORWARD -i $INTIF -o $EXTIF -m state --state NEW,ESTABLISHED -j ACCEPT
      # allow ping
        $IPTABLES -A INPUT -p icmp -i $EXTIF -j ACCEPT

        # Allowing access to the FTP server"
        $IPTABLES -A INPUT -i $EXTIF -p tcp --dport 21 -j ACCEPT

        ### SUBNET 192.168.0.1 ###

        ## Allowing access to the NFS server
        ## $IPTABLES -A INPUT -i $INTIF -p tcp --dport 2049 -j ACCEPT




        # ftp ports - supports passive mode
        $IPTABLES -A INPUT -i $EXTIF -p tcp --dport 50000:60000 -j ACCEPT
        $IPTABLES -A OUTPUT -p tcp --source-port 50000:60000 -j ACCEPT


        # Allowing access to the ssh server on port 22
        $IPTABLES -A INPUT -i $EXTIF -p tcp --dport 22 -j ACCEPT

        # Allowing access to the web server on port 80
        $IPTABLES -A INPUT -i $EXTIF -p tcp --dport 80 -j ACCEPT


        # DC port, see http://www.nongnu.org/microdc
        $IPTABLES -A INPUT -i $EXTIF -p tcp --dport 10101 -j ACCEPT

        # bittorrent ports
        $IPTABLES -A INPUT -i $EXTIF -p tcp --dport 6881:6999 -j ACCEPT
        $IPTABLES -A OUTPUT -p tcp --source-port 6881:6999 -j ACCEPT

        # TOR PORTS
  # ORPort 9001
        $IPTABLES -A INPUT -i $EXTIF -p tcp --dport 9001 -j ACCEPT
        # DirPort 9030
        $IPTABLES -A INPUT -i $EXTIF -p tcp --dport 9030 -j ACCEPT



        # block out all other Internet access on $EXTIF
        $IPTABLES -A INPUT -i $EXTIF -m state --state NEW,INVALID -j DROP
        $IPTABLES -A FORWARD -i $EXTIF -m state --state NEW,INVALID -j DROP


        #### $IPTABLES -A OUTPUT -p tcp --dport 22 -j ACCEPT

        # doesn't belong here but what the heck
        route add -host 255.255.255.255 dev eth1
Can't really help you to much, I'm in CAR and my server is in sweden, really don't wanna mess with settings.

Good luck!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"creating symbolic link" "operation not permitted" wheni Linux - Newbie 3 05-08-2011 01:36 AM
"attempt to access beyond end of device" problem.... AnalyticaL Linux - Hardware 0 10-01-2004 01:16 PM
"X-MS" cant open because "x-Multimedia System" cant access files at "smb&qu ponchy5 Linux - Networking 0 03-29-2004 11:18 PM
need help, on how to access quickly to special characters like "ñ" or "á"? Motaro Linux - Newbie 1 12-31-2003 11:53 AM
Config problem: "Authorization failed: server rejected access" -- help please! womble_timsk Linux - Networking 0 05-22-2003 04:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration