Slackware Router
I want to make my own router using an old computer and slackware. The hardware includes, two 10/100 nic cards and one dlink 802.11g wireless card. I want one nic (eth0) to use dhcp to obtain an ip address, the other nic (eth1) to have a static ip address of 10.0.0.1 and the wireless card (ath0) to have a static ip address of 192.168.1.1. A firewall should be implemented along with a dhcp server for other computers on the network to obtain their ip addresses.
Just wondering if anyone has taken on a similar projects, and what results you have had with different programs... Thanks, blue |
should'nt be a problem, have a look at /etc/rc.d/rc.inet1.conf
for the dhcpserver i'd suggest dnsmasq and for the firewall http://www.slackware.com/~alien/efg/ might prove useful |
So how do I make that server act as a gateway also? What do I use to forward the internet? Does slackware 12 already have a dhcp server installed, or am I going to have to install one on my own?
Only thing I really know about setting up a server is apache, php, and mysql. I really don't even know where to start on anything else... Thanks, blue |
I believe dnsmasq is a 'DNS forwarder and DHCP server', it is installed if you did a full install, if not, then install the package off the disk. Now, you do have to configure it properly.
|
Quote:
You need to look at the Net-HOWTO to get some useful information. You want basically a file server with NAT, firewall and services. This can be done easily with Slackware using the Net-HOWTO. You could also reference a lot of links in 'Slackware-Links' which was compiled from 'Slackware LQ Suggestions Links!'. You will find the quagga and zebra router projects listed in the network section of the above links if you just want to implement a router. |
make the following occur
1. install slackware to be in ip-forward mode. selectable at setup, or via making this file executable: /etc/rc.d/rc.ip_forward 2. add to /etc/rc.d/rc.local eth0 gets IP via dhcpcd from your modem. put modem in half bridge mode for the linux box to do authenication, if you have permanent IP, do after initial setup. 1 step at a time! /sbin/dhcpcd eth0 eth1 gives out IP's via dhcpd /sbin/dhcpd eth1 run your filewall /etc/rc.d/rc.firewall # get hold of a script on the net....somewhere! 3. add to /etc/revsolve.conf put your gateway server address here if not doing authentication. else your isp DNS address nameserver 10.0.0.34 4. add your dns server address to your /etc/dhcpd.conf file and your address range example: ddns-update-style none; option domain-name "blah.net"; option domain-name-servers xx.xx.xx.xx; subnet 192.168.0.0 netmask 255.255.255.0 { option netbios-name-servers 192.168.0.1; option routers 192.168.0.1; range 192.168.0.250 192.168.0.253; } that should get most of the way!! been doing it this way for years. |
I had to setup my laptop here as a router for my brother's new gaming rig, and it was a real pain. So, now that I have it figured out, I'm gonna write here what I did so maybe it will help someone.
First lemme define a few things: * I currently have a ppp connection to the internet (it kinda sucks, but the only other alternative is 56k), this connection is 'ppp0' (it uses a USB port, so I have my ethernet port free). * I bought a long ethernet cable and ran it to my brother's computer (it runs BlueWhite64, and is setup to use DHCP for eth0, I used 'netconfig'), my computer connects to his also through interface 'eth0', but on my computer I didn't yet setup eth0. So: ppp0 is the external connection (connects to internet) eth0 is the internal connection (connects to my bro's computer) The steps I took are: 1) As coremp says, run: Code:
chmod a+x /etc/rc.d/rc.ip_forward 2) Go to Alien Bob's EFG and get a new 'rc.firewall' script: http://www.slackware.com/~alien/efg/ For 'Internet Interface:' I put 'ppp0', then when it says 'Single System or Private Network Gateway?', choose 'Gateway/Firewall', click 'generate firewall', and then put in your specs... I put: Internal Network Interface: eth0 Internal Network IP Address: 192.168.1.1 Internal Network: 192.168.1.0/24 Internal Network Broadcast: 192.168.1.255 then click 'generate firewall', and put the results in '/etc/rc.d/rc.firewall' and make it executable 'chmod a+x /etc/rc.d/rc.firewall'. If you had another script in there, run '/etc/rc.d/rc.firewall stop', then '/etc/rc.d/rc.firewall start' (not sure if there's a restart option). 3) Now you must edit '/etc/dhcpd.conf', here's what mine looks like: Code:
# dhcpd.conf Code:
nameserver 84.247.48.3 4) Almost done, now just run: Code:
ifconfig eth0 192.168.1.1 That's it. But, don't think it was that easy. It didn't make sense for quite some time. It took me several hours to figure this out ... and I have a headache. Good luck. |
All times are GMT -5. The time now is 03:17 AM. |