LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-18-2011, 05:08 AM   #1
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Rep: Reputation: 30
Internet sharing?


Dear All
My centos 5.6 firewall server shares its Internet connection with my windows machine behind it. After the required settings, the windows machine can ping valid ip addresses but it cannot browse valid url (despite the fact that DNS is set for it). Can you please give me a hint?
Thank you
 
Old 07-18-2011, 05:18 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
You need to provide more useful information if we are to help you. You should be providing actual error messages etc. What does "cannot browse" mean? What actually happens? If pinging is working then web pages should be also, from the linux side of things, unless you have iptables rules blocking it. Do you?
 
Old 07-18-2011, 06:03 AM   #3
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
I have set eth0 @192.168.10.114 and eth0:1 @172.18.128.1 . The windows machine ip @172.18.209.1
I have activated ip forwarding in /etc/sysctl.conf 'net.ipv4.ip_forward=1' . I run 'sysctl -p' to reload settings . I issued the following command to share internet :
#iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
On windows machine, I set its default GW as @172.18.128.1 . I set DNS for the windows machine like the ones set on centos . The windows machine can ping valid ip but cannot browse valid url.
 
Old 07-18-2011, 06:07 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
restating the question isn't useful. show us your "iptables -Lnv" output
 
Old 07-18-2011, 06:31 AM   #5
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
Please find attached the required log.
Attached Files
File Type: txt log-iptables.txt (3.1 KB, 14 views)
 
Old 07-18-2011, 06:35 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
well that looks fine, I'd say the issue is probably on windows.
 
Old 07-18-2011, 06:41 AM   #7
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
Sorry. What can be done on the windows machine side?
 
Old 07-18-2011, 06:43 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
Maybe it's configured to use a proxy?

I would suggest trying to telnet to www.linuxquestions.org on port 80 from the windows machine and see if that connects.

Last edited by acid_kewpie; 07-18-2011 at 06:47 AM.
 
Old 07-18-2011, 06:51 AM   #9
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
On windows machine , the following command is unsuccessful:
C:\telnet www.linuxquestions.org 80
But if I do it like the following, it is successful:
C:\telnet 75.126.162.205 80
What can I do next?
 
Old 07-18-2011, 07:16 AM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
Sounds like DNS then.
 
Old 07-18-2011, 07:19 AM   #11
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Hello,

you should check the DNS-settings on the Windowsmachine. could you please post the output of
Code:
ipconfig /all
from the Windowsmachine?

Or look at "Networks"->"property of the Networkconnection" (I don't know the english menueentries)

Markus
 
Old 07-18-2011, 07:42 AM   #12
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
Please find attached the required log.
Attached Thumbnails
Click image for larger version

Name:	ipconfig.JPG
Views:	9
Size:	56.4 KB
ID:	7597  
 
Old 07-18-2011, 09:54 AM   #13
Larry James
Member
 
Registered: Jun 2000
Location: Buffalo, New York
Distribution: Fedora, Ubuntu
Posts: 361

Rep: Reputation: 39
Quote:
Originally Posted by acid_kewpie View Post
Maybe it's configured to use a proxy?

I would suggest trying to telnet to www.linuxquestions.org on port 80 from the windows machine and see if that connects.
What do you get when you try to access your Linux share using the Linux machine's IP address from Windows?

If that works try adding this line to your Windows hosts file.

Windows Host file by default found at:
C:\Windows\System32\drivers\etc\hosts:
Code:
[ipaddress]	[hostname]
Replace [ipaddress] (drop the brackets) with the ipaddress of your Linux machine. Replace the [hostname] with the hostname of your Linux machine.

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
 
Old 07-19-2011, 12:25 AM   #14
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
I tried to edit and change the windows hosts file you mentioned but the system returned 'access denied' .
 
Old 07-19-2011, 01:14 AM   #15
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
Quote:
Originally Posted by Larry James View Post
What do you get when you try to access your Linux share using the Linux machine's IP address from Windows?

If that works try adding this line to your Windows hosts file.

Windows Host file by default found at:
C:\Windows\System32\drivers\etc\hosts:
Code:
[ipaddress]	[hostname]
Replace [ipaddress] (drop the brackets) with the ipaddress of your Linux machine. Replace the [hostname] with the hostname of your Linux machine.

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
what linux share? Why would they want to be editing hosts files???
 
  


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 Sharing ajkannan83 General 7 05-24-2006 07:46 AM
Internet Access & Internet Sharing Through Wi-Fi. Be.Gurmeet.Be Linux - Networking 0 04-13-2006 04:07 PM
mandrake 10.1 sharing files and internet sharing xfiles_arram Linux - Networking 0 05-21-2005 03:22 PM
Internet Sharing Nightmare Linux - Networking 4 02-19-2005 09:19 PM
File sharing and internet sharing mullet Linux - Networking 1 10-14-2003 02:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:36 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration