LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 02-09-2004, 05:59 PM   #1
matt_w_lambert
Member
 
Registered: Jan 2003
Location: WA
Distribution: Red Hat 9.0, mandrake 9.2
Posts: 194

Rep: Reputation: 30
how to connect to internet through network


ok i got my network up (first time for me) and now i want to be able to connect through the internet over the network could sombody tell me how this is done
 
Old 02-09-2004, 06:20 PM   #2
wapcaplet
Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
What kind of network do you have? Do you have a router or firewall? If so, your router is probably your gateway; if you know its IP address on your network, you can assign it to be your default gateway by opening up a terminal and (as root) typing:

route add default gw 1.2.3.4

where 1.2.3.4 is the IP of your gateway. That should get you onto the internet. You will probably also need a nameserver - something to tell your browser and other internet apps how to translate a name (like yahoo.com) into an IP address. If your internet service provider gave you a nameserver (its IP address), you can add it to /etc/resolv.conf. Just add a line that says:

nameserver 5.6.7.8

where 5.6.7.8 is the IP of the nameserver. It might also be the case that your router (if you have one) is the nameserver, in which case just use that IP address.

Finally, to make sure your ethernet card is set up properly, you should just be able to enter:

ifconfig eth0 a.b.c.d up

where a.b.c.d is the IP address of your computer on the local network. Replace eth0 with a different name, if your ethernet device is not eth0.
 
Old 02-10-2004, 07:23 PM   #3
matt_w_lambert
Member
 
Registered: Jan 2003
Location: WA
Distribution: Red Hat 9.0, mandrake 9.2
Posts: 194

Original Poster
Rep: Reputation: 30
i don't have a router it is just 2 pc conected ( does this work with dialup)
i don't know much about networking i just learned how to conect 2 pc's together like 2 days ago ??


ok i think i got it working half way i added the nameservers on my main pc to the /etc/resol.conf on my other pc and on pc #2 when i do ping linuxquestions.org it shows the ip address of it but it doesn't connect ???

Last edited by matt_w_lambert; 02-10-2004 at 07:32 PM.
 
Old 02-10-2004, 07:56 PM   #4
wapcaplet
Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
I'm not too sure how to do it with a dialup connection... you'd probably have to configure your internet-connected box (the one that does the actual dialing) to be the gateway; set up the gateway for the second box as explained. The big step though is to make your first box do internet sharing. Are both of them Linux boxes? If so, check out this article and this HOWTO. Basically what you'll do is set up your connected box to forward stuff to the other box across the network; any incoming transmissions destined for your other box will be forwarded, and its IP address "masqueraded", since that box won't actually be directly part of the internet. Sorta complicated, but it's doable. There might even be a GUI configuration tool with your distribution for setting it up automatically; if there isn't, it should be as simple as installing iptables (which may already be installed) and making a couple edits to one of your configuration files.
 
Old 02-10-2004, 09:55 PM   #5
matt_w_lambert
Member
 
Registered: Jan 2003
Location: WA
Distribution: Red Hat 9.0, mandrake 9.2
Posts: 194

Original Poster
Rep: Reputation: 30
thanks for the help if i can't get that to work i figured out an eiser way i think

all i do is ssh into my main pc and run konqueror and it works
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to connect to Internet from a school network? Itachi Linux - Networking 1 07-15-2005 07:24 AM
Creating a network, then connect to internet Developer Beaud Linux - Networking 4 07-07-2005 10:32 PM
How to connect to the internet using network card? Henningstrom Linux - Newbie 6 02-27-2005 08:48 PM
Connect to internet through network kiteguy101 Linux - Newbie 1 10-22-2004 04:10 PM
my new network card cant connect to internet klara Linux - Networking 5 09-02-2004 08:39 AM


All times are GMT -5. The time now is 06:08 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration