Linux - Wireless NetworkingThis forum is for the discussion of wireless networking in Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've read linuxquestions.org for over 2 years now, and have just decided to register.
So let's get down to it.
I finally got my Linksys WPC54GS to work in Suse 9.1 (defualt 2.6.4-52), using ndiswrapper 0.9, so I may be able to help anyone with an issue regarding that, as I overcame a few issues myself. Back to business, I want to set up this computer (running Suse 9.1 personal) as a gateway/dhcp server for my other computer (running Windows XP). I'll be using wlan0 as the internet connection and eth0 to connect to a hub. I'm really not to sure where to start, so any help is appreciated.
well, for the dhcp server, it's basically just a matter of installing the package, and then editing your /etc/dhcpd.conf file...
as for the gateway, you basically just need an iptables script... how comfortable are you with iptables??
ps: you might also wanna install dnsmasq on the gateway, so that the hosts on your lan don't need to use your ISP's DNS servers (this makes web surfing much faster)...
Downloaded the packages for DHCP, DHCP Server, DHCP Tools, and Dnsmasq.
Installed them all.
I did some reading on iptables, I have a decent idea of what they are now, and what they do, not so sure on how to make/implement them yet.
The /etc/dhcpd.conf and the iptables script; are they ment to work together, or just sperate examples of each?
Originally posted by chaosego Downloaded the packages for DHCP, DHCP Server, DHCP Tools, and Dnsmasq.
Installed them all.
I did some reading on iptables, I have a decent idea of what they are now, and what they do, not so sure on how to make/implement them yet.
The /etc/dhcpd.conf and the iptables script; are they ment to work together, or just sperate examples of each?
they are separate examples... however, the iptables script is configured to allow a dhcp server on the lan, the rule that allows that is:
basically, you just execute the iptables script and you're done... copy/paste the script from here into a text file, make the file executable, and execute it (as root)...
once you know the script is working the way you want it to (you might need to make some adjustments to the script), you just set it to run automatically on startup...
as for dnsmasq, you might not need to configure anything at all, just start it with this command:
Code:
dnsmasq --interface=eth0
once you have it working right, then also just add the command to your startup sequence... the same goes for the dhcp server, which can be started with:
Code:
dhcpd eth0
here's a good resource for iptables educational material:
Before I configured my wireless card, this laptop always used to access the internet via it's eth0. Should I be making a lot of changes to ifcfg-eth0? Or could I just make a new ifcfg-eth0.1 for when I want to use it as the gateway/dhcp server ? If so are there any significant changes I need to make, and what are they? Thanks for all your help so far.
Oh I was curious where you got that iptable script. Did you write it yourself, or is there an archieve somewhere?
Originally posted by win32sux make the file executable, and execute it (as root)...
Please elaborate, mainly on how to make it executable. I'm guess it will be with chmod, which I've only used before, and sparringly. (If it's not clear yet, I'm still pretty new with linux, but I'm trying to learn. )
Originally posted by chaosego Before I configured my wireless card, this laptop always used to access the internet via it's eth0. Should I be making a lot of changes to ifcfg-eth0? Or could I just make a new ifcfg-eth0.1 for when I want to use it as the gateway/dhcp server ? If so are there any significant changes I need to make, and what are they? Thanks for all your help so far.
Oh I was curious where you got that iptable script. Did you write it yourself, or is there an archieve somewhere?
basically you just need eth0 (your lan interface) to have an ip like 192.168.0.1 and a netmask like 255.255.255.0... your internet interface should be configured in the normal way, either statically or with dhcp.. i'm not sure what kinda configuration your external card uses...
i made the script myself, it's similar to what i use on my box... the link i posted above has plenty of other example scripts...
Originally posted by chaosego Please elaborate, mainly on how to make it executable. I'm guess it will be with chmod, which I've only used before, and sparringly. (If it's not clear yet, I'm still pretty new with linux, but I'm trying to learn. )
you're on the right track...
Code:
chown root.root example.txt
chmod 700 example.txt
the first command makes root the owner of the file...
in the second command, the 7 gives root read/write/execute permission, the first 0 gives users in root's group zero permissions (nothing) and the second 0 gives other users zero permission...
"No subnet declaration for eth0 (0.0.0.0).
** 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. **
Not configured to listen on any interfaces! "
I'm trying to fiddle with the dhcpd.conf atm, but I don't seem to be getting anywhere.
[Edit]
I am not 100% sure of the order which I should be doing these commands. As of now I'm doing something like :
# ./gateway.iptables //the ip table script you posted
#ifup eth0
#dnsmasq --interface=eth0
#dhchd eth0
Other then the error I said above, the only other thing that goes on is it waits for the eth0 to connect to a dhcp server (which I know there isn't one running yet, but i'm gonna run it ... right?), so it sets it to listen in the background? I'm getting slightly more 'in the loop' here, but I'm also getting slightly more lost. hehe.
after eth0 is configured then you can start the dhcp daemon (make sure you copy/paste the example configuration into your /etc/dhcpd.conf)...
ps: i just edited the script, adding a rule allowing pings from the lan to the internet, so that you can test the forwarding easily by pinging internet hosts...
first, i wanted to thank win32sux for being so very clear on your explanation.. i managed to follow it, as i am trying to do just about the same thing.
i followed everything up to the end, and i got my gf's windoze machine to PING out, but cannot get outbound browsing. (no MSN, no IE)
but it CAN ping out by name and number...
any suggestions?
thanks..
slackware 10 on dell latitude w/ 2 ethernet cards
eth0 = internet
eth1 = local ( i modified the scripts to reflect this)
Originally posted by soylentgreen first, i wanted to thank win32sux for being so very clear on your explanation.. i managed to follow it, as i am trying to do just about the same thing.
i followed everything up to the end, and i got my gf's windoze machine to PING out, but cannot get outbound browsing. (no MSN, no IE)
but it CAN ping out by name and number...
any suggestions?
thanks..
slackware 10 on dell latitude w/ 2 ethernet cards
eth0 = internet
eth1 = local ( i modified the scripts to reflect this)
thanx!
okay so you can't surf from the lan, but you can ping an ip like "216.239.57.99" and a domain like "google.com" from your girlfriend's pc on the lan??
what does the logfile show when you attempt to surf from the lan??
Code:
tail -f /var/log/syslog
also, make sure you don't have your girlfriend's pc set to use a proxy or something...
are you using a dns daemon on the slackware gateway??
she doesn't have a proxy running..
previously i had this machine w/xp and ICS...
she can ping google.com and numbers.. but no browsing.. hopefully i captured what you needed to see from the log..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.