SlackwareThis Forum is for the discussion of Slackware 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.
Sorry in advance for asking because I know this question gets asked alot but I am at my wits end and need any help I can get. I want to set up a slackware server that acts as a DHCP server as well as a Router. The computer has a 700 mhz P3, 384 mb ram, 30 gb hard drive, and 2 3Com Nics. eth0 gets assigned an IP address by my ISP(through DSL) and eth1 has a static address 192.168.0.1/24. I don't know what to do because its my first time attempting to set up a slackware server. I tried to use the script here as well as following the guide here. All I have tried to do has been a failure. Can someone explane to me the process of how to set up the router. I have the DHCP server running and its assings IPs. Here is the conf file.
The DHCP server seems to work fine but the router doesn't. If someone can help me set up the router that would be great. Sorry again for asking this question but help is needed.
What I can't do is get the computer to act as a router. I have tried chmod +x /etc/rc.d/rc.ip_forward. Then starting it. I have tired to use the firewall script from here. I did modify the script so that ext=eth0 and int=eth1. I also changed the line "ipt=/sbin/iptables" to "ipt=/usr/sbin/iptables" because /sbin/iptables gave an error. I just don't know the process of setting up a router and what I have tried didn't work. I tried to follow the directions from the link here. Any help would be appriciated. Thanks and sorry for asking a repetive question again.
I only spent about 30 secs looking at the firewall script, but as it stands, it looks like only port 22 (ssh) is open, so are you sure that everthing isn't perfectly OK exccept that you're blocking traffic you actually want?
Try adding port 80 to the line
tcp_ports="22"
I assume space delimited, but to be honest, I'm not sure
Applogies if you already did this, but soemtimes it helps to point out the obvious because it can be easy to miss
Just to let you know, I tried the script out on the box I use as a router, and it works as is, except of course I set "ext" and "int" to suit.
Try running the script, then post the output from iptables -L.
Also, what user are you running the script as? What are the IP addresses of eth0 and eth1 (I assume for eth1 you meant 192.168.0.1, mask 255.255.255.0)? Perhaps post the output of ifconfig as well.
Does /sbin/iptables exist on your system? If so, what error did you get when you ran with this setting?
Last edited by billymayday; 04-22-2006 at 07:34 PM.
More importantly though, can you access anything through your IPS from the machine you are trying to use as a router? ie - is it the routing that's the issue of the connection in some form.
Here is what I did today. I reinstalled Slackware and set up the DHCP server(which appears to be working fine). From the server I could connect to the outside world via FTP and telnet. I ran the firewall script (after I changed the int and ext to suite my needs and changed /sbin/iptables to /usr/sbin/iptables)and that caused the connection to the outside world to halt and nothing works anymore from my server. I am going to, tomorrow after I get out of class, to reinstall everything, start ip_forward and see if my client machines can connect to anything. If so then I will re-run the script and see what happens(if I get the same results). I will post the ifconfig output tomorrow. Thanks for changing the name and any help so far.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.