Dead Men Walking

dMw Chit Chat => The Beer Bar => Technology Section => Topic started by: JB on September 30, 2003, 06:33:50 PM

Title: Using a spare PC as a router
Post by: JB on September 30, 2003, 06:33:50 PM
Is it possible to setup a spare pc i have as a router and have it connected to the net permanently?  I've downloaded and installed a copy of windows 2000 advanced server mainly for the NAT capabilities it has, and also tried setting the server up as a NAT server but am somewhat unsure where i'm going wrong.  

In basic terms i've done the following.
1:) started NAT in the 'routing and remote access' section of 'administrative tools'
2:) setup my adsl modem as the external part, and the nic as the internal part.
3:) on the client machine ive set my default gateway as the IP of the server.
4:) forwarded port 80 incoming and outgoing to my machine.

However is there something i'm missing? that stands out at all?  More ports?  Some sort of easy configuration guide?

Please dont say to me use ICS because i've tried that and it's just not what i want.

If anyone helps me out and fixes me probs then there's sure to be a good stiff drink in it for ya, IF your going to the LAN.  I aint posting no pint of beer nowhere.
Title: Using a spare PC as a router
Post by: DogMeat on September 30, 2003, 06:43:43 PM
Two words:

Coyote Linux. (http://www.coyotelinux.com/)

DM
Title: Using a spare PC as a router
Post by: smilodon on September 30, 2003, 06:49:02 PM
You will need a floppy disk though  ;)
Title: Using a spare PC as a router
Post by: Anonymous on September 30, 2003, 07:00:21 PM
QuoteOriginally posted by JB@Sep 30 2003, 06:33 PM
Is it possible to setup a spare pc i have as a router and have it connected to the net permanently? I've downloaded and installed a copy of windows 2000 advanced server mainly for the NAT capabilities it has, and also tried setting the server up as a NAT server but am somewhat unsure where i'm going wrong.

In basic terms i've done the following.
1:) started NAT in the 'routing and remote access' section of 'administrative tools'
2:) setup my adsl modem as the external part, and the nic as the internal part.
3:) on the client machine ive set my default gateway as the IP of the server.
4:) forwarded port 80 incoming and outgoing to my machine.

However is there something i'm missing? that stands out at all? More ports? Some sort of easy configuration guide?
JB, you don't say what problems you are experiencing (just that something seems to have gone wrong). More info please and we'll see what bull we can pass your way  ;)
Title: Using a spare PC as a router
Post by: Doorman on September 30, 2003, 07:29:21 PM
QuoteOriginally posted by BlueBall+Sep 30 2003, 07:00 PM-->
QUOTE (BlueBall @ Sep 30 2003, 07:00 PM)
Title: Using a spare PC as a router
Post by: Anonymous on September 30, 2003, 07:35:11 PM
QuoteOriginally posted by Doorman@Sep 30 2003, 07:29 PM
Bet I know which bit was edited. ;)
I bet you do as well :)
Title: Using a spare PC as a router
Post by: JB on September 30, 2003, 08:12:50 PM
As i know feck all about Linux and unless it turns there's a 'click here for Linux installed and running as you like button' then i won't be installing that.

Well the main problem is that the 2nd machine, with the internal IP i dunno how to set it up so it sees the internet and i dunno how to set it up so it see's the internet.  technically 2 points, but such a big one it's worth mentioning twice. (ahh.. classic red dwarf joke)

I also believe i have to forward ports for such things as Steam, Kazaa, mIRC, etc, etc.  Just how do i find out what ports to forward and what to stop?
Title: Using a spare PC as a router
Post by: Anonymous on September 30, 2003, 08:52:36 PM
my preferred solution would be to get the windows server to run dhcp and allocate all you need from that (IPs, Gateways, DNS addresses etc). However, if you are "uncomfortable" with setting up DHCP then a manual approach on the client machine will suffice.

I'm assuming that you ran the NAT wizard OK and that is working. I have also made a big assumption and that is that the NAT service will allow traceroutes through.

First, check the IP address and mask of the LAN NIC on your server. Suggest you use 192.168.1.1 and a mask of 255.255.255.0. NB that it is best not to allocate a default gateway to the internal NIC on an MS server (it is more secure that way).

Based on the IP of your NIC allocate an IP to your client PC (such as 192.168.1.2) and give it the same mask. You should provide the IP of the server NIC as the default gateway of your client.

At this point I suggest testing the connection. Try to traceroute to homer.deadmen.co.uk by IP not by NAME (193.110.88.20). If that works we can move on, if not then check that you can ping your server - if not, go drink heavily to raise your spirits then check for typos

If the ping to homer works we now need to tell your client machine how to resolve names. Look at the config of your DSl Modem?cable modem and see what DNS servers are allocated.  Put these into the IP config of your client PC and then try traceroute to homer by NAME and not IP. If that works then go drink heavily to celebrate as everything works.

let us know how this goes and we'll move onto to the next part (joined up IP ;))
Title: Using a spare PC as a router
Post by: tugs on September 30, 2003, 10:10:35 PM
Smoothwall is a nice easy firewall for linux. I know you aren't likely to go the linux route, but it had to be said. Many linux installs _are_ pretty much point and click these days - and once it's set up, who cares anyway? not like it's your day to day machine...

Presuming smoothwall is still free, of course.
Title: Using a spare PC as a router
Post by: DogMeat on September 30, 2003, 11:54:53 PM
QuoteOriginally posted by JB@Sep 30 2003, 08:12 PM
As i know feck all about Linux and unless it turns there's a 'click here for Linux installed and running as you like button' then i won't be installing that.
You obviously didn't bother to click the link.

Good luck with your continued pissing about with windows.

DM
Title: Using a spare PC as a router
Post by: TeaLeaf on October 01, 2003, 08:09:35 AM
I have to admit that I didn't click the link either - my distinctly limited linux knowledge was a mental block in that respect.  :(   However I have now and am pleasantly surprised - it looks real nice - and works with a Microsoft Wizard interface ::

Check it out JB.......

TL.
Title: Using a spare PC as a router
Post by: JB on October 01, 2003, 08:40:25 AM
Am i wrong in thinking Linux doesnt support usb?  Only i use a usb modem to connect to the net.
Title: Using a spare PC as a router
Post by: tugs on October 01, 2003, 08:53:07 AM
A cursory web search (i.e. google "linux usb modem support") would indicate that you are wrong, and linux does support USB and indeed USB modems. Whether all linux distributions support USB, and whether those that do have USB support all USB devices is a different question. And coyotelinux appears not to support non-serial modems based on the "system requirements" on the front page.

That's not to say that I'd say linux's USB support exactly rocks, but it's there of a sort.

Of course, if you're happy playing with Windows, then it's a moot point.
Title: Using a spare PC as a router
Post by: Rad_Man on October 01, 2003, 12:38:18 PM
I gave up on the linux coyote thing and just went to pc world(cough cough) and purchased a belkin Cable modem router with 100Mb 4 port switch and built in manageable firewall. COST : £40.00

Works a treat , supports VPN connections both ways and is a breeze to install, added bonus LIFETIME WARRANTY
Title: Using a spare PC as a router
Post by: tugs on October 01, 2003, 01:13:05 PM
QuoteOriginally posted by Rad_Man@Oct 1 2003, 11:38 AM
I gave up on the linux coyote thing and just went to pc world(cough cough) and purchased a belkin Cable modem router with 100Mb 4 port switch and built in manageable firewall. COST : £40.00

Works a treat , supports VPN connections both ways and is a breeze to install, added bonus LIFETIME WARRANTY
I'm curious - true (e.g. Stateful) firewall, or "NAT Firewall"?
Title: Using a spare PC as a router
Post by: Gandalf on October 01, 2003, 01:24:36 PM
it'd be a nat firewall almost certainly.
Title: Using a spare PC as a router
Post by: tugs on October 01, 2003, 01:29:03 PM
QuoteOriginally posted by Gandalf-LordOfJelly@Oct 1 2003, 12:24 PM
it'd be a nat firewall almost certainly.
And hence I asked a deliberately leading question :-)

It all depends what you wanna get out of it at the end. If you just want a "NAT firewall", just run ICS on windows...
Title: Using a spare PC as a router
Post by: DogMeat on October 01, 2003, 03:17:30 PM
QuoteOriginally posted by Rad_Man@Oct 1 2003, 12:38 PM
I gave up on the linux coyote thing and just went to pc world(cough cough) and purchased a belkin Cable modem router with 100Mb 4 port switch and built in manageable firewall. COST : £40.00

Works a treat , supports VPN connections both ways and is a breeze to install, added bonus LIFETIME WARRANTY
So did I.

Pity they ain't Open Source though - I would have nicked it instead.. :narnar:

DM
Title: Using a spare PC as a router
Post by: JB on October 01, 2003, 07:35:26 PM
Can i buy a router and still use it with my 1 IP, or would i need to get more IP's? (probably at a cost from my isp)

Obviously i'd want to play games, web browse, get mail etc etc and do the usual stuff.
Title: Using a spare PC as a router
Post by: Anonymous on October 01, 2003, 09:15:08 PM
Assuming it is a NAT router then your router would use your 1 IP for it's WAN interface and all PCs on LAN side of router can use private IPs in range 192.168.x.x with a mask of 255.255.255.0. Set default gateway of client PCs to LAN side IP address of router (which you can normally set through the router config) :)
Title: Using a spare PC as a router
Post by: JB on October 01, 2003, 09:58:54 PM
Anyone recommend a mid range Router?  Prefer built in hub/switch, NAT obviously, no external modem needed and anything else that would come in handy, hardware firewalls cheap now-a-days?
Title: Using a spare PC as a router
Post by: Doorman on October 01, 2003, 10:02:15 PM
Well, I've got one of these (http://www.netgear.com/products/prod_details.asp?prodID=140&view=) and I am more than happy with it. Can't say more. Althought you may not want a print server they do others. Checkit. (http://www.netgear.com/products/routers/firewallvpn.asp)
Title: Using a spare PC as a router
Post by: Doorman on October 01, 2003, 10:07:54 PM
On the subject of routers, any of you network dudes know if it is possible to ensure that each pc in a network keeps it's own IP? Every so often I have to alter the port forwarding because the IPs change.
Title: Using a spare PC as a router
Post by: OldBloke on October 01, 2003, 10:17:26 PM
Just disable DHCP in your router and give your PCs static IP addresses.

Your router should be 192.168.1.1

So setup your first PC with an IP that you want it to have (to fit in with your existing port forwarding info) and give it a default gateway of 192.168.1.1

Do any other PCs the same. You may have to set DNS info for the PC as well.
Title: Using a spare PC as a router
Post by: JB on October 01, 2003, 11:04:02 PM
Thanks ron but i was after something with a built in modem.  Which i did happen to find on the Netgear website (http://www.netgear.com/products/prod_details.asp?prodID=136) i'd appreciate anyone's comments on the DG814(replaced by DG834.)  Mainly would it be suitable for what i want, playing games online, msn messenger, kazaa and irc.  Basically is there anything i wouldn't be able to do that i can now with a non-nat'd setup?



Btw i'm fecked if i can get this nat windows 2k thing sorted.  Can't traceroute, ping or indeed do anything from the 2nd pc.  I also get an error message when the server starts up and looking into the event viewer it says:

 'Unable to contact a DHCP server. The Automatic Private IP Address 169.254.51.129 will be assigned to dial-in clients. Clients may be unable to access resources on the network.'

I get the same error message but with 6 or so diffrent ip's, all with the same 1st and 2nd set of sigits but with differing 3rd and 4th.
Title: Using a spare PC as a router
Post by: tugs on October 02, 2003, 08:59:07 AM
Win2k and the wonderful 169.254 addressing. Microsoft bought that range for what can best be called "plug and play" networking - that it, if your machine is configured to get its address from DHCP and the machine doesn't find a DHCP server, then it will randomly pick an address from the 169.254 space, send a few packets out to the address it's hoping to pick and see if anybody says "hey, that's my address, get off it", and if not selects it. Therefore if you put two machines on a LAN and let them do this, they'll get addresses and be able to see eachother on IP. Which is good (and suspiciously close to how the much-maligned Appletalk used to select addresses).

The fact you're getting that on your server, presuming your server has a fixed IP (otherwise it'll be useless as a gateway) indicates to me that you're running a dial-in server, and it wants to know what addresses should be assigned to devices connecting to it. This does not sound like what you want to set up if you're just using it as a dialout router. Indeed, for security purposes, dialin should be disabled unless you really need it.
Title: Using a spare PC as a router
Post by: tugs on October 02, 2003, 09:00:40 AM
Not being funny, and maybe I'm missing the point here, but if you just want NAT, why not just run the built-in Windows Internet Connection Sharing? Not really "custom-configurable", but it would work.
Title: Using a spare PC as a router
Post by: Doorman on October 02, 2003, 09:23:17 AM
QuoteOriginally posted by OldBloke@Oct 1 2003, 10:17 PM
Just disable DHCP in your router and give your PCs static IP addresses.

Your router should be 192.168.1.1

So setup your first PC with an IP that you want it to have (to fit in with your existing port forwarding info) and give it a default gateway of 192.168.1.1

Do any other PCs the same. You may have to set DNS info for the PC as well.
Thanks Oldone, just the job!  :D