LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 08-12-2004, 10:29 AM   #1
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676
Blog Entries: 7

Rep: Reputation: 32
Question Connect to the internet through my LAN


Hello folks,Iam a novice in Linux, but I almost now my way around by now without getting lost.I own an internetcafe which has 7 PCs, on of the client computers if installed Red Hat 9.0 KDE environment, I ve got a dual boot system with win xp and redhat, Iam doing this as a test to see if I use linux for my internet cafe. The problem is that ive got no idea how to configure my computer to access the internet through the network. I use static IPs normally and the ip of the computer in question is 192.168.10.6 (in my xp configuration), and this computer gains access to the internet through the server which has the IP 192.168.254. The dns server of the client is 192.168.10.254 ( in the xp configuration) and the subnet mask is 255.255.255.0( in the xp configuration), the default gateway is 192.168.254( in the xp configuration).
So if anyone of you guys could kindly be of any assistance I would be very thankful
 
Old 08-12-2004, 10:45 AM   #2
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
I think there were some typo's, You meant that the dns and the gateway have address 192.168.10.254.

It seems to be simple
open terminal program ( make sure you are root, if not type first su -l )
and type

redhat-config-network

choose the edit button

and

set Statically set IP adress

fill in the same information you used in XP
 
Old 08-12-2004, 10:49 AM   #3
Charalambos
Member
 
Registered: Aug 2004
Location: Switzerland
Distribution: debian
Posts: 149

Rep: Reputation: 15
I strongly belief that if you would have searched (google, red hat homepage, this forum) you would have found the solution.
Just read the red hat documentation and you will find how to set that.
 
Old 08-12-2004, 11:53 AM   #4
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676

Original Poster
Blog Entries: 7

Rep: Reputation: 32
I ve done as you told me arno, and Ive activated it. But I still canot access the internet.Besides if i ping the server it says "Network Unreachable"
 
Old 08-12-2004, 12:04 PM   #5
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
is the network interface up?issue

ifconfig -a

and post the results. what are the firewall settings on the linux machine? i'd turn it off until you get things working? how about the firewall on the gateway?
good luck.
 
Old 08-12-2004, 01:03 PM   #6
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676

Original Poster
Blog Entries: 7

Rep: Reputation: 32
HI peacedog thank you for being helpful, I executed ifconfig -a.And that is the result ===>



[root@localhost root]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0B:6A:49:22:F4
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:120 (120.0 b) TX bytes:168 (168.0 b)
Interrupt:11 Base address:0xdc00

eth0:1 Link encap:Ethernet HWaddr 00:0B:6A:49:22:F4
inet addr:196.168.10.6 Bcast:196.168.10.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:120 (120.0 b) TX bytes:168 (168.0 b)
Interrupt:11 Base address:0xdc00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:256 errors:0 dropped:0 overruns:0 frame:0
TX packets:256 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:17206 (16.8 Kb) TX bytes:17206 (16.8 Kb)
 
Old 08-12-2004, 01:45 PM   #7
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
looks like the nic is ok, lets look at the routing table. issue

route -n

and post the results. again have you checked the firewall status at both ends?
good luck.
 
Old 08-12-2004, 02:41 PM   #8
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
ALInux,

There seems to be two nic's in you computer, if you don't need them both you better remove one ( disable it thru your computer bios setting )
 
Old 08-12-2004, 02:43 PM   #9
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
Sorry disregard last message
You have add an alias to your nic
remove that one
 
Old 08-13-2004, 12:50 PM   #10
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676

Original Poster
Blog Entries: 7

Rep: Reputation: 32
Dear Peacedog Iam sorry to reply at such a late time
but I ve done the route -n command ====>


Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
196.168.10.6 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 lo
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
 
Old 08-13-2004, 05:39 PM   #11
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
In the listing from route there should be a line like

0.0.0.0 192.168.0.254 0.0.0.0 UG 0 0 0 eth0

Because you have created an alias on eth0 the routed daemon does not know what to do and does nothing.

remove the alias by
ifconfig eth0:1 196.168.10.6 del

now change the settings of the eth0, by following the instructions I posted

redhat-config-network
 
Old 08-13-2004, 06:18 PM   #12
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
sorry for missing this but user arno was ontrack w/his post about the alias on the nic. i also believe you have made some typos during configuration so lets start over first read this entire post and choose what will suit your needs before even as much as opening a terminal. that said here are some methods to get you up

try this, issue

ifconfig eth0:1 down

then issue

ifconfig eth0 down

now thats done issue

ifconfig eth0 192.168.10.6 netmask 255.255.255.0 up

after that you'll need to add your default gateway, issue

route add default gw 192.168.10.254 eth0

finally you'll need to add your dns server to /etc/resolv.conf open a text editor as root then open

/etc/resolv.conf

edit the file

nameserver 192.168.10.254

alternatively as arno suggested you could run redhat-config-network then edit accordingly, or you could manually edit your

/etc/sysconfig/network-scripts/ifcfg-eth0

file and make the noted changes above there. you'll also need to edit

/etc/resolv.conf

as noted above. hope something here gets you going. those are about all of the tools and possibilities i'm aware of. one last note don't forget to restart the network after manually editing any files related. the changes will not take effect until this happens if you take that route.
good luck.
 
Old 08-14-2004, 06:28 AM   #13
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676

Original Poster
Blog Entries: 7

Rep: Reputation: 32
Hi arno and a special Hiiiiiii to PEACEDOG, Iam sending this reply from my Linux distribution, everything is allright here, thank you guys for your support.
PEACEDOG rulllllllllllllllllllleeeeeeeeeeeeeeeZzZzZzzzzzz
 
Old 08-14-2004, 09:54 AM   #14
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
arno first recognized the alias problem and gets credit as well in my book. glad you got it sorted. ;-)
 
Old 08-14-2004, 06:46 PM   #15
pepisfree
LQ Newbie
 
Registered: Aug 2004
Distribution: 2.6.12-gentoo-r10
Posts: 12

Rep: Reputation: 0
iptables masquerade connect problem

I have a lan with 2 computers. My gateway is running iptables (masquerading) and shares connection to the internet for another laptop. my Laptop can connect to the internet but cannot access www.hotmail.com, www.mappy.fr and some others; though my gateway can connect to them. Any idea of this problem?
 
  


Reply



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
No Internet but LAN and VPN connect LAN work fine??? xavior SUSE / openSUSE 7 11-09-2005 01:14 PM
How to connect to Internet using LAN bongski55 Linux - Networking 2 10-13-2005 08:29 AM
how to connect to internet by lan??? duzy Linare 3 09-21-2004 07:27 AM
I cant connect to the internet via LAN BroinK Slackware - Installation 9 01-22-2004 03:32 PM
Cant connect to the internet through LAN Jimmyscab Linux - Networking 5 12-09-2002 08:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration