LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 12-12-2002, 09:24 AM   #1
ridha
LQ Newbie
 
Registered: Nov 2002
Location: france
Distribution: redhat8.0 and mandrake9.0
Posts: 22

Rep: Reputation: 15
Smile internet connection on linux


hi
i am new in Linux, i used winnt4.0 to share internet in my local network, now i want to use Linux as a local server instead of winnt to connect to the internet and share it to the other computer in my local network. so i would like to know with programms should i use witch files should be configured in order to connect to the internet with Linux and share it.
i have a modem connected to a router that is connected to the computer using ethernet card and another ethernet card for the local network eth1. i have a permanant connection with a fix ip. i configured the 2 cards but i still can't connect to the internet
so please help me
thank you
 
Old 12-12-2002, 09:29 AM   #2
Thymox
Senior Member
 
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345

Rep: Reputation: 56
Am I right in thinking that your setup is like this?
Code:
Internet --> Router --> Linux Box --< Rest of network
If so, then you will want your Linux box configured so that eth0 is on one ip group and eth1 is on another, you would then set your Windows boxes to connect via (proxy?) your Linux box's eth1 ip address. Lots of people will suggest that you use dhcp for the internal, local network (of with your Linux box's eth1 will be a part of), but I maintain that if you're on a very small network (< 10 machines), it is just a easy to maintain if you give each one a seperate IP address.

HTH
 
Old 12-12-2002, 09:39 AM   #3
ridha
LQ Newbie
 
Registered: Nov 2002
Location: france
Distribution: redhat8.0 and mandrake9.0
Posts: 22

Original Poster
Rep: Reputation: 15
sorry but u seem that u misundertood me , I couldn't connect to internet now , the eth1 have as ip 193.92.100.66 & is connected to the router which have an ip 193.92.100.65 ( i think that is the gateway ) & the nameserver of my isp ( i put them as the forwards in named.conf ) but the answer by ping to any host like www.google.fr is always "network unrecheable " & in the status bar of mozilla is first resolving hostname & now sending request but process isn't answering
thanks
 
Old 12-12-2002, 09:44 AM   #4
Thymox
Senior Member
 
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345

Rep: Reputation: 56
Sorry... I did misunderstand. I have not run into problems like this, myself, so please ignore my above post. Sorry I can't help.
 
Old 12-12-2002, 04:59 PM   #5
plonker
LQ Newbie
 
Registered: Nov 2002
Location: Melb, Oz
Distribution: RH 9, Solaris 9
Posts: 9

Rep: Reputation: 0
Is it just name resolution that doesn't work? Can you ping an IP address for example (www.google.fr - 216.239.37.101) . If you cant then you need to see at what point you are getting stuck at. The way I do this is do a ping to each point out of your network until you find the address that is not responding, then investigate from there. At least then you will have narrowed down your problem to one spot.

Craig
 
Old 12-12-2002, 06:02 PM   #6
ridha
LQ Newbie
 
Registered: Nov 2002
Location: france
Distribution: redhat8.0 and mandrake9.0
Posts: 22

Original Poster
Rep: Reputation: 15
i can ping in my local network but when i try to ping outside (internet) i have a message that said "destination host unreachable"
so i am asking if something to be done to connect to the internet . i configured the 2 ethernet cards one for the local network and the other to connect to the internet .
as i said above i used this configuration modem -> router (193.96.X.X) ->(193.96.X.X+1) linux (redhat8) 192.168.0.3
 
Old 12-12-2002, 06:35 PM   #7
plonker
LQ Newbie
 
Registered: Nov 2002
Location: Melb, Oz
Distribution: RH 9, Solaris 9
Posts: 9

Rep: Reputation: 0
Ok. Here are a few things to look at

Have you put a route in place from one network card to the other on the Linux box? I am not sure exactly on the syntax (I am still new to Linux as well) but do a man route it it will show you some examples.

Do you have a FW (iptables?) running on the Linux box? Maybe this is blocking your access out. Maybe turn it off temporarily to verify a connection?

If you either telnet or console into your router can you verify that you can ping the internet from there. If you cant then the Linux box may not be your problem.


Craig
 
Old 12-13-2002, 12:18 PM   #8
bbenz3
Member
 
Registered: Feb 2002
Location: Orlando
Distribution: Whatever I feel like at the time I install.
Posts: 284

Rep: Reputation: 30
OK the way I see it is that you have everything setup except for the linux box. You need to be using either ipchains or iptables. I personally like iptables better and it is what replaced ipchains.
You should create a file that you execute on startup that will autostart these functions.

You also need to enable IP Forwarding by this line:
echo 1 > /proc/sys/net/ipv4/ip_forward
You also need these lines to forward traffic between NICs:

iptables -t nat -I POSTROUTING -p all -d 0/0 -s 0/0 -j SNAT --to-source xxx.xxx.xxx.xxx (ext IP address)

if you e-mail my i will send you a copy of my script (too big for here)
 
  


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
Linux internet connection kite10linux Linux - Software 0 07-27-2005 02:43 AM
internet connection with linux sachitha Linux - Newbie 12 04-04-2005 10:35 AM
i can get internet connection in windows but in LINUX there is no connection ruzvay Linux - Networking 2 06-08-2004 07:02 PM
Internet connection sharing between XP and linux kidicarus Linux - Networking 16 09-16-2003 07:05 PM
linux slowdown when internet connection is down shzshi Linux - Newbie 0 07-14-2003 08:39 AM


All times are GMT -5. The time now is 08:41 AM.

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