LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-14-2008, 10:28 PM   #1
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 341

Rep: Reputation: 34
Smile Internet Connection sharing on RHEL 5


Hi dear friends.

I am new to this site as well as to linux.

I have a DELL P4 2.8 GHZ with RHEL 5 having two NICs installed.

my internet connection is working fine.

I have another computer MDG with windowsXP. I want internet working on it as well, through RHEL5.

Means i need help to share internet connection in RHEL 5 whith windows computer

Any freinds know please help me out

Thanks
 
Old 05-14-2008, 11:35 PM   #2
dkm999
Member
 
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
This question has been asked so frequently that I have a set of web pages discussing it. When you have your Linux machine all set up to handle Network Address Translation, you either need to assign a static IP address to the XP box by using the Control Panel, or turn on Dynamic Host Control Protocol on the Linux box so that it will hand out an IP address to the Windows box.

You will need to configure the dhcpd daemon to tell it what range of addresses to manage, and then you will have to set it so that it is enabled in runlevels 3,4, and 5.
 
Old 05-15-2008, 02:06 PM   #3
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 341

Original Poster
Rep: Reputation: 34
hi soldier

Thank u very much for help. Dear freind! I did it already.

wat i did..

..is TCP/IP configuration of NIC in WindowXP client i gave the alternative tcp ip setting.


I dont know somthing may wrong with those seetings
can u please tell me wat seeting u sud specify therere.

Means gateway.. etc..

I am connected throgh DSL modem to the internet.

Dear freind if u can .. i want to know what about other seetings in RHEL 5 i have to do except from

ipforwarding

Please tell me or i have to just setup.. DHCP..

Thanks again for help

Looking forwared same in future

Varinder Singh
 
Old 05-15-2008, 11:24 PM   #4
dkm999
Member
 
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
To assign a static address to your XP machine, follow this sequence of clicks:

1. Start
2. My Network Places
3. View Network Connections
4. (dblclick) choose the LAN interface that you are using.
5. General
6. Properties
7. Scroll down to Internet Protocol (TCP/IP)
8. Properties
9. Use the following address
10. {enter an address, not the IP for the Linux box, but on the same subnet}
11. { enter subnet mask, probably 255.255.255.0, but it must match what you told the Linux box}
12. Default Gateway: address of the Linux box on this subnet.
13. Use the following DNS server address
14. {enter IP address of the DNS server your ISP supplies, unless you are running DNS server on your Linux box}
15. OK
16. OK
17. Close

The important points about choosing IP addresses are:
1. Each machine gets a different one.
2. Your Linux box and the XP box should share a common IP network space (eg, 192.168.1.x).
3. Subnet masks must be the same for all members of the subnet, so that they all agree which of the 32 bits are network number, and which are host number. For the example here, the subnet mask should be 255.255.255.0. This will allot 254 host numbers (you cannot use 0 or 255), and the left-most 24 bits will be interpreted as a network number.
4. Your XP machine does not need to know, and should not be told anything about the public-side IP address for your Linux box. The NAT operations should completely mask that address from the XP machine.
 
Old 05-16-2008, 01:08 PM   #5
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 341

Original Poster
Rep: Reputation: 34
Yes Great Man

Thanks for help.. Its really appriciating.

now what i did ..let me expalinit to you

I tried the same what u said

my confiuration is

Linux box is 192.168.0.254

I gace to windowsXP 192.168.0.10
subnet 255.255.255.0
gateway 192.168.0.254

DNS Server 192.168.2.1 (ISP gave it to me)

this all ii have done..

dear freind STILL its not working...

Oh yea..

Please note i was doing

I ping the linux box from Windows XP

# ping 192.168.0.254

It works

Windows xp pinging itself.. fine

But
I tried to ping Windows XP computer from linux Box
# ping 192.168.0.10 WINXP coputer's IP

Its not pinging.. oh my god why?? can u tell me please

i think there is somthing wrong from Linux Box side.. right?

Please rpely

Thanks again for help
Varinder Singh
 
Old 05-17-2008, 08:56 AM   #6
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 341

Original Poster
Rep: Reputation: 34
oh now i have disabled the fire wall of windows..

now my linux box can ping to windows XP

& vice versa,

BUT problme is still no internet on windows Xp

Please reply

thanks
 
Old 05-17-2008, 12:15 PM   #7
dkm999
Member
 
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
This gives us some more information that will change my previous advice. Your ISP is using a Private Networking address range (192.168.2.x) for its connection to you, and then you are using a (different) Private Networking address range for your LAN (192.168.0.x). In this situation (where there is no Network Address Translation), your Windows XP box should specify its gateway address as 192.168.2.1 (which should be the default route on your Linux box, too). That way, the Linux box just passes the XP box traffic through without having to do any hard thinking about it.

Please also make sure that the Linux box has a default route; you can see it using the command
Code:
# netstat -rn
The default is the one with all zeroes in the Destination field and Flags='UG'.
 
Old 05-17-2008, 12:37 PM   #8
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 341

Original Poster
Rep: Reputation: 34
Hi all soldiers

Thanls for help

Here the mission is acmoplished..

I visted lot of web sites, ultimately got it..
yes

here is wat we hace to do is

just these commands

# iptables -t nat -A POSTROUTING -0 eth0 -j MASQUERRADING
#service iptables save
#service iptables restart

& one final last modification in the file the permameters should be same is given below
#vi /etc/sysctl.conf

net.ipv4.ip_forward = 1

and ots done..

Windows XP xomputer has internet

Thanks again
bye
New mission
 
  


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
Internet Connection Sharing sparker Linux - Networking 1 03-11-2008 05:06 PM
Internet connection sharing on RHEL 4 csghosh Linux - Networking 6 07-10-2006 10:11 PM
internet connection sharing fiveball02 Linux - Networking 3 11-05-2005 08:03 PM
how to setup internet connection in rhel ws raid_hat Red Hat 9 01-10-2005 01:57 PM
Internet Connection Sharing qsilver Linux - Networking 1 07-19-2001 01:31 AM


All times are GMT -5. The time now is 12:30 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