LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Internet sharing? (https://www.linuxquestions.org/questions/linux-newbie-8/internet-sharing-892265/)

hadimotamedi 07-18-2011 04:08 AM

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

acid_kewpie 07-18-2011 04:18 AM

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?

hadimotamedi 07-18-2011 05:03 AM

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.

acid_kewpie 07-18-2011 05:07 AM

restating the question isn't useful. show us your "iptables -Lnv" output

hadimotamedi 07-18-2011 05:31 AM

1 Attachment(s)
Please find attached the required log.

acid_kewpie 07-18-2011 05:35 AM

well that looks fine, I'd say the issue is probably on windows.

hadimotamedi 07-18-2011 05:41 AM

Sorry. What can be done on the windows machine side?

acid_kewpie 07-18-2011 05:43 AM

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.

hadimotamedi 07-18-2011 05:51 AM

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?

acid_kewpie 07-18-2011 06:16 AM

Sounds like DNS then.

markush 07-18-2011 06:19 AM

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

hadimotamedi 07-18-2011 06:42 AM

1 Attachment(s)
Please find attached the required log.

Larry James 07-18-2011 08:54 AM

Quote:

Originally Posted by acid_kewpie (Post 4417938)
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

hadimotamedi 07-18-2011 11:25 PM

I tried to edit and change the windows hosts file you mentioned but the system returned 'access denied' .

acid_kewpie 07-19-2011 12:14 AM

Quote:

Originally Posted by Larry James (Post 4418091)
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???


All times are GMT -5. The time now is 07:59 AM.