Click to See Complete Forum and Search --> : dhcp hostname and optus@home sharing


Malevolent
10-14-2002, 09:35 PM
I've installed Redhat 8.0 recently and I have this network set up.


optus@home
cable modem
|
|
|eth1 (dhcp)
PC with Win XP dual boot Redhat 8.0
|eth0 (I want it to be 192.168.2.1)
|
|
5 port 100mbs switch
|
|
|
Win XP (192.168.2.2)

With Windows I have the internet sharing working fine.

With Linux I have two questions(probably more soon...)

1. I use dhcp on eth1 and it tells me to write the hostname into the /etc/hosts file.
my /etc/hosts file look like this.

127.0.0.1 localhost.localdomain localhost

Do I add the hostname to end of this line???
or a new line with IP address? (doesn't it detect new IP address everytime?)

2. How do I set up my eth0 so it can share internet access with my other computer?

Also please don't tell me to check out www.linuxathome.net
I clear explanation will be nice :)

bastard23
10-15-2002, 03:51 PM
Malevolent,
You probably don't need to add a name to the /etc/hosts file. If you do, you would add a new line with:
<ip number> <full domain name> <Aliases, other names>
Do a 'man hosts' for the documentation of /etc/hosts.

As for sharing the internet access, there are many docs available. Linux Masquading HOWTOs (http://www.tldp.org/HOWTO/HOWTO-INDEX/networking.html#NETROUTING). RedHat 8.0 docs (http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/), check the customization and security docs (These aren't that great for the task.) And actually the linuxathome.org docs are nice. Check the IPTABLES document. These require hand editing of files.

There are programs to do this, but I've never used them. Fwbuilder (http://freshmeat.net/projects/fwbuilder/?topic_id=151) (freshmeat link) looks nice. Does anyone have any recomendations???

Hope that helps,
chris