Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Setting up a NAT server without DHCP
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
shash
Apprentice
Apprentice


Joined: 18 Apr 2003
Posts: 220
Location: India

PostPosted: Mon Aug 18, 2003 2:25 pm    Post subject: Setting up a NAT server without DHCP Reply with quote

I have a small home-office network with a large problem!

I use my two computers from home, and my father's office computers are networked here. We also have a cable internet connection which comes to my home PC, but which can be switched to the office when I'm not around to conserve speed. Until I set up Gentoo on my home system, I was switching the connection around so that my dad could use it without trouble when I was away. But now, with a running system here, I want to be able to give him access at the same time. But I don't want to go the classical route of DHCP, since this system may be down when I'm not at home, and we would switch the connection around and allow the office system to run directly, and I don't want to have the office systems without a DHCP when I'm not online.

Is there any way to do this?
Back to top
View user's profile Send private message
MrPyro
Tux's lil' helper
Tux's lil' helper


Joined: 14 Aug 2003
Posts: 121
Location: Sheffield, England

PostPosted: Mon Aug 18, 2003 2:39 pm    Post subject: Reply with quote

You can set up NAT without DHCP as long as the static IP addresses of the machines in your father's office network fall within a sensible range. The main reason to use DHCP is that this ensures that any machine connecting has a unique IP in a suitable range for the network.

If, for example, you set up the internal network so that each machine has a unique IP address in the 192.168.0.* range (netmask 255.255.255.0), you can set the firewall to masquerade internal requests using that IP range to the outside world. Look up a good NAT tutorial (I don't know any off the top off my head), or I can post the iptables firewall I use for NAT, if you want.
_________________
Back off man, I'm a computer scientist
Back to top
View user's profile Send private message
shash
Apprentice
Apprentice


Joined: 18 Apr 2003
Posts: 220
Location: India

PostPosted: Thu Aug 21, 2003 6:47 pm    Post subject: Reply with quote

Thanks! :)

Now, could someone tell me what packages I should merge? Obviously, I'll need a NAT server and a firewall, but is there anything else? And what software would be best?
Back to top
View user's profile Send private message
MrPyro
Tux's lil' helper
Tux's lil' helper


Joined: 14 Aug 2003
Posts: 121
Location: Sheffield, England

PostPosted: Tue Aug 26, 2003 11:09 am    Post subject: Reply with quote

Personally, for NAT and firewall I just use iptables: it handles port-blocking and masquerading. You will need to add a couple of options to your kernel to enable it: Packet mangling is one, and packet filtering; there may be more, so try and find a good online tutorial: some places just offer some pretty good basic firewall scripts that work straight off.

This looks like a pretty good tutorial

http://www.tldp.org/HOWTO/IP-Masquerade-HOWTO/

EDIT: You will need to emerge iptables the package as well as the kernel options.
_________________
Back off man, I'm a computer scientist
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum