LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Internet Sharing with DHCP connection to the Net (https://www.linuxquestions.org/questions/linux-networking-3/internet-sharing-with-dhcp-connection-to-the-net-65773/)

Earp 06-15-2003 03:50 PM

Internet Sharing with DHCP connection to the Net
 
I'm planning on setting up a computer with Gentoo to act as a NAT router, Web server, etc. Right now I have everything working fine with Win2k on the server, but I'm going to do some hardware upgrades, and I figured this would be as good a time as any to put linux on.

This site was helpful.

Here

However, where it says

/sbin/ifconfig eth0 XXX.XXX.XXX.XXX netmask 255.255.255.0 broadcast XXX.XXX.XXX.255 - External network (internet)
/sbin/ifconfig eth1 192.168.10.101 netmask 255.255.255.0 broadcast 192.168.10.255 - Internal private network

How should eth0 be configured if my ISP uses DHCP?

acid_kewpie 06-15-2003 03:57 PM

you're not really going to use ifconfig in that sense. To be honest I can't acutally remember HOW i set up my network on gentoo (the boot cd automatically configured it first of. from then i guess it was the "emerge system" which took care of it ???)

the information for the interfaces are going to be kept in /etc/conf.d/net, and it's much simpler than those examples. there's only two lines used to set up my workstation (which isn't routing anything):

iface_eth0="dhcp"
gateway="eth0/192.168.0.1"

much more straightforward. configuring the other interface is just a logic extension....

as for NAT and all that, if you don't feel like wading through iptables by hand, try "emerge firestarter" which will set up a nifty gtk2 based iptables interface, providing a firewall and NAT in one.

gentoo rocks.


All times are GMT -5. The time now is 02:03 PM.