Guest bhrich902 Posted October 2, 2003 Report Share Posted October 2, 2003 ok, i have a cable connection at home hooked to a router in which 4 other machines are connected to. i often have to unplug the router and plug it back in (netgear router) because i loose connection or connection gets slow and doing this solves it. i was wondering if i can setup a linux box to act as a router to provide ip addresses and internet connection to the other machines (dhcp?), and probably avoid my current unplugging and plugging dilema. also, what other hardware would i be needing, what are some pros/cons. the systems behind the routers are a OS X(10.2), XP, win98, and mandrake 9.1. also, i could probably use a firewall setup on that box. thx for any replies... Quote Link to comment Share on other sites More sharing options...
roland Posted October 2, 2003 Report Share Posted October 2, 2003 Hi, yes Mandrake 9.1 can easily provide internet sharing connection and firewall. first set the internet connection of the PC alone with MCC::DrakConnect, expert mode, uncheck local network setting for now, second set the network connections also MCC::DrakConnect. If not already installed, install DrakWizard Now you can also install DHCP server and Samba file sharing server Now install the Internet connection sharing: MCC::DrakGw. It installs a firewall (shorewall), and a DNS server for the local network (bind). Now shorewall will block samba file sharing with the server but that's an other matter that can be fixed later. I advice you install all that order and check each time you installed something. Win98 client setup is the basic one: no fixed IP addresse, leave empty GATEWAY ip and DSN ip. Remove NETBEUI and IPX/SPX protocols if present. For me it worked better with Samba as a NT Domain server and Win98 as NT Domain clients but thats an other matter too. Can't help with mac OSX clients and even Mdk clients. Must be easy with Mdk clients. roland Quote Link to comment Share on other sites More sharing options...
Guest bhrich902 Posted October 2, 2003 Report Share Posted October 2, 2003 thx for the tip, but would i need some extra hardware for the server box, cause im trying to do all this by not using the router i have now. thx... Quote Link to comment Share on other sites More sharing options...
Gowator Posted October 2, 2003 Report Share Posted October 2, 2003 OK, you need another Network card (NIC).... It only needs to be 10mbit but any old one will do. So presuming your router is working OK once you stop changing the machines round this gets plugged into the other one. Like However, if you wanna user the main PC as a normal PC I found the DrakConnect stuff impossible. You can install it etc. BUT afterwards go to the shorewall website and download the corresponding setup. Running Shorewall on Mandrake with a two-interface setup?If so, the documentation on this site will not apply directly to your setup. If you want to use the documentation that you find here, you will want to consider uninstalling what you have and installing a setup that matches the documentation on this site. See the Two-interface QuickStart Guide for details. Well thats what you need so don't use the Mandrake settings.... You have been warned...SEE http://www.shorewall.net/ Quote Link to comment Share on other sites More sharing options...
Guest bhrich902 Posted October 3, 2003 Report Share Posted October 3, 2003 hmm...thinking...k i got it...thx... Quote Link to comment Share on other sites More sharing options...
Gowator Posted October 3, 2003 Report Share Posted October 3, 2003 Note... The two NIC's are non optional for what you want to do. YOU MUST NOT USE THE SAME SWITCH/HUB to connect to the DSL modem as the internal network. Why not read the shorewall easy set-up. Its really very nice once you read it. I used it for a while before changing to a dedicated router/web/mail server. Quote Link to comment Share on other sites More sharing options...
Guest bhrich902 Posted October 6, 2003 Report Share Posted October 6, 2003 what are the pros and cons of using setting a linux box to act as firewall, router as supposed to using an off the shelve router? Quote Link to comment Share on other sites More sharing options...
roland Posted October 9, 2003 Report Share Posted October 9, 2003 I don't know about routers. Just I know a Linux box can perfectly do the job, even an old one. Even it don't need to have a keyboard or screen: admin it with webmin. And it can be used as file server, DHCP server, DNS server too. roland Quote Link to comment Share on other sites More sharing options...
DragonMage Posted October 10, 2003 Report Share Posted October 10, 2003 Switch router (especially the wired version) is so cheap now that buying them is not going to hurt you in the pocket (unless you live in a 3rd world country like I do or you are just plain poor). The advantages of that type of router is that it is easy to use, doesn't take much electricity, small, and totally silent. The disadvantage of the off the shelf router is that you don't learn anything much about networking, the money spent, and the reliability is determined by the manufacturer, not you. Anyway, if you have a throw-away pc and you have time to burn, you may want to use a linux router. If you want something that work RIGHT NOW, you can spend about 50 bux to buy an off the shelve router. I am not surprised if some of the off the shelve router uses linux as their OS. Quote Link to comment Share on other sites More sharing options...
Gowator Posted October 10, 2003 Report Share Posted October 10, 2003 Disadvantages: Cost, Need to learn about networking Advantages Need to learn about networking :wink: Can be used for other things like NFS server/Samba server/Webserver/print server/Wifi router/ISDN backup fallover/DHCP To me its a matter of understanding. My router also works as lots of other things. I have two: one is 1 P100, the other a Duron 1300 The P100 can do the SMB/NFS and static web pages but gets challenged on phpBB2 serving becuase of the mysql. However, you can buy a 50$ hardware device and just do routing but you still need to do other things. If you rely on your PC(s) then it makes sense to have a seperate fileserver/printserver etc so you can mess about with a PC and not loose any data. If you install a different distro you don't need to worry about reconnecting USB printers etc. or your web page stopping working becuase apache doesn't have execute on cgi-bin etc. I just lost my uptime on my router because my ISP went down. I lost faith and tried to fix my router..... nothing was wrong with it, it was my ISP. Luckily I stopped myself trying to fix it further.... and when my ISP put me back in the morning it reconnected itself. It might cost you 200-400$ for a dedicated router under linux. For this you should get a disk, mobo, CPU and memory and two NIC's You don't need a CD/floppy/keyboard/monitor (once its installed) You might want to even invest in two disks and do SW RAID. However, you will get a dedicated router/firewall. You get a DMZ for your web/ftp etc. which you won't get using a hardware router. You will have to invest some time....how much depends on you. I use the E-Smith SME server (Free edition) Uptimes are limited only by your hardware or if you wanna change hostname. It takes 1/2 hour to install and configure, you tap in your pppoe stuff and it connects. At this pouint you really haven't learned much. You get a fully functional Webserver/SMB server and lots more along with a dedicated router and firewall without learning anything. However, when you wanna do something outside the spec you start learning loads. And it has the capacity to do whatever you want. I'm starting to wonder if i shouldn't actually learn NETBSD and have a NETBSD router instead since I am presently starting to appreciate the limitations of linux. (Not compared to windows) If you have the time and money or an old machine its a brilliant learning experience. The DHCP works faultlessly, I lose maybe 1/10th of a second in bootup of my laptop or (if I reboot a desktop) ... Quote Link to comment Share on other sites More sharing options...
Guest bhrich902 Posted October 13, 2003 Report Share Posted October 13, 2003 thx for the info... Quote Link to comment Share on other sites More sharing options...
Crashdamage Posted October 13, 2003 Report Share Posted October 13, 2003 Also keep in mind that... 1. You don't necessarily have to have a machine dedicated to being only a router or router/server. Your main box can serve as the router along with doing it's other duties, like my home machine does. All you need is the 2nd nic - or 2 or 3 if you have the open slots and want to skip using a hub/switch. 2. Linux allows much more flexibility in setup than some cheapo routers. For example, after running about 3 years without a reboot, the old RedHat6 linux router at my business fried when the CPU fan stopped. I figured, screw it, I'll just get a $50-60 router and get going again the quick 'n easy way. Yeah, right. I took 2 new routers take back 'cause they would not allow me to setup a reasonable level of security and still allow pcAnywhere to work. Bought Model X, no go, but they swore if I went back and got Model Z it would. After a couple of hours talking to their tech support both they and I realized it wasn't gonna happen, the necessary options just weren't there. Screwed around with those most of a day and still no joy. So I gave up and made another Linux router out of an old Pentium 166 + motherboard I had around. Problem solved in less than an hour. Now if I can just find time to set it up as a mail server also... Quote Link to comment Share on other sites More sharing options...
Gowator Posted October 13, 2003 Report Share Posted October 13, 2003 You can also use the MAC to do it! If you have 2 ethernet connections. i.e. airport and the 10/100/1000 Ive actually done this on a laptop under extreme circumstances when we needed to run an ICA client which was being redirected by the company firewall. I just used a PCMCIA ethernet card on one end and the inbulit 10/100 on the other and remapped the ports on the fly. Isn't U|Linux wonderful !!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.