Some questions on Setting up a Router/Gateway
Hi - I have a gateway with two ethernet cards.
I would one (eth0) to use DHCP to get the internet and its name servers etc, and I would like the second one to run Samba, NFS and DHCP (for the rest of the computers on the network). I have not understood how to tell one interface eth0 to do DHCP and the other, eth1 to be static at 192.168.0.1 - how do I do this! Can I run dhcpd with a rule to configure itself??? After we have solved the static IP problem, I would like to know, how do I get the machine to act as a gateway? Thanks, Riddick |
you can tell dhcpd to only listen on eth0 by specifying at runtime:
Code:
dhcpd eth0 remember that: DHCPD = dhcp daemon DHCPCD = dhcp client daemon DHCPD is what will serve IPs to your LAN... DHCPCD is what will request an IP for eth0 from your ISP's DHCP server... as for the IPs, it's simple... configure eth0 to use DHCP (how you do this depends on your distro) and make eth1 have a static IP... Code:
ifconfig eth1 inet 192.168.0.1 netmask 255.255.255.0 to make your box act as a gateway, you need to activate forwarding: Code:
echo "1" > /proc/sys/net/ipv4/ip_forward http://iptables-tutorial.frozentux.n...-tutorial.html read-up on SNAT and MASQUERADE.... ;) just my :twocents:... |
I like the 2cents! Excellent I got it working!
This is an excellent resource, even though I am running slackware: http://www.aboutdebian.com/ Thanks for everything, Riddick |
All times are GMT -5. The time now is 06:38 PM. |