Jump to content

On the road to a Linux router… need some help.


Guest giap01
 Share

Recommended Posts

Guest giap01

All,

This is my first post. I have been looking around for a few days and love how it’s set up, lot’s of helpful comments.

 

My goal is to replace my Linksys router with the Linux box I just loaded up (Mandrake 9.0). I have worked on Linux before, and networked it into my home network, but have not yet taken it to the next step and use it's networking potential.

 

I have drawn out my ultimate goal and it is on my web site at:

http://www.52monkeys.com/images/setup.gif

 

I’ll keep it short for now, first things first. I need to get the Linux box connected to the internet first and go from there. I need some help on the following.

 

I need to fill in:

Host Name, DNS server, Gateway & Gateway device.

 

What are the rules on the Host Name?

Do I have to leave it Localhost.Localdomain?

What are my options?

 

DNS server?

Is this the Ethernet card (eth0 or IP address) that is hooked up to my cable modem or not?

 

Gateway?

This is the IP to my cable modem’s IP address (1.2.3.4), right?

 

Gateway device?

Is this the Ethernet card that is hooked up to my cable modem or not?

 

Thanks in advance, any help is appreciated and will be used.

 

Pat G.

Omaha NE

Link to comment
Share on other sites

Guest Joentje

I don't know how your ISP assigns ip-addresses. Most cable ISP's I know use host name based DHCP. So you should set up DHCP, there will be an option to set the host name there.

DNS server should be your ISP's DNS servers, they know the addresses.

 

When you are connected, the gateway should be the ip assigned to Nic-1 (in your gif on your site). This is also the gateway device.

 

Also you need to enable ip-forwarding.

 

echo 1 > /proc/sys/net/ipv4/conf/eth0/forwarding

 

Also you need to enable NAT (Network Address Translation)

 

http://www.netfilter.org/unreliable-guides/NAT-HOWTO/

 

Hope this helps a litle.

Link to comment
Share on other sites

http://www.shorewall.net/

 

I would love to help you further but cable modems don't exist where I come from :roll:

 

hostname can be anything you want

my host name at home is {computer name}.loudas.com

at the office {computer name}.lodge.office

I used to have this at home {computer name}.home.loudas

 

DNS:

the dns needs to pioint be the ip address of a running dns server.

here is a quick way to check if a dns server is running on an ip address

dig @{insert ip here} loudas.com

dig @202.27.218.96 loudas.com

Link to comment
Share on other sites

Guest giap01

Joentje & Paul, thanks for the replies.

 

Here is what I tried:

 

I took out one NIC so I was just had just one NIC installed.

The connection scheme was:

Cable to cable modem, cat5 from modem to the NIC (eth0) in the Linux box.

 

When I ran the Internet connection wizard for eth0, I chose:

1. Auto detection

2. Cable Connection

3. IP: 192.168.1.1, Netmask:255.255.255.0, bootp/dhcp not selected

4. Host: localhost.localdomain, DNS:*.*.16.25, Gateway:(192.168.1.1) & (*.*.46.142, my ISP-supplied IP)

5. Restart the network

6. Congratulations, your finished (or something like that).

 

I ran the same choices with a LAN connection as well, same results.

 

After these choices were made, the card was "UP" and the connection was "Not Connected".

I ran the "Connect", it ran, tried to detect and connect, no dice.

 

In a terminal session I pinged the following:

ping 192.168.1.1 - Good reply

ping *.*.16.25 (DNS server) - Destination Host Unreachable

ping *.*.46.142 (my ISP-supplied IP) - Destination Host Unreachable

ping www.yahoo.com - Unknown Host www.yahoo.com

 

Results of ifconfig eth0:

eth0	Link encap:Etherenet HWaddr 00:50:22:D3:C6:4B

inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0

UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 METRIC:1

RX packets:11951 errors:0 dropped:0 overruns:0 frame:0

TX packets:702 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueulan:100

RX bytes:1109718 (1.0 Mb) TX bytes:48480 (47.3 kb)

Interrupt:9 Base address:0x8800

 

I'm sure that I'm doing one thing wrong, or one thing not right.

 

I want to get my Linux box connected to the internet, then put the second NIC in hooked to my

hub then serve internet to my other PC's.

 

Thanks again, I'll keep trying.

Link to comment
Share on other sites

Guest giap01

My ISP dynamically assigns IP's. I think that I need to not assign an IP manually to eth0 and select (bootp/dhcp) on the third screen of the connection wizard.

If this is the case, what device or IP do I point to for my 'Gateway'?

Should I make the change to dynamically assign eth0 an IP, restart the system, do an 'ifconfig eth0' and put that IP in the 'Gateway' box?

 

Somebody shoot me the info.

 

Thanks....

Link to comment
Share on other sites

Guest tezca

if your isp gives out dynamic ip addresses, yes set the ip of eth0 to be dhcp the gateway is the gateway address they gave you the dns servers the ones they gave you or " detected automatically

 

also this is impotant! you may need to edit a couple files here is an example

# /etc/resolv.conf

# this is an example if your isp was verizon or whoever

search verizon.net

nameserver 4.2.2.2

nameserver 4.2.2.3

 

the next file the order is important, the defualt is order hosts, bind change it to bind,hosts the reason is that other wise your system looks in /etc/hosts file first you want it to query a nameserver first

#/etc/host.conf

order bind,hosts

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...