LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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-19-2011, 12:17 AM   #16
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 hadimotamedi View Post
I tried to edit and change the windows hosts file you mentioned but the system returned 'access denied' .
Don't do that, it's pointless.

OK, from windows can you 1) ping your DNS server and 2) do a lookup, e.g. "nslookup google.com"
 
Old 07-19-2011, 12:34 AM   #17
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
what linux share? Why would they want to be editing hosts files???
I see. Glance of the topic when he mentioned server shares, I though he was trying to provide file sharing. Closer reading is showing that he just wants to browse the Internet.

Editing the hosts file would give immediate resolution to a problem dns for file sharing.

Closer reading, I see he's looking for something different.

While it's rare, I misread a users initial intention.

It wouldn't have hurt to set the hosts file to test a ping and connection to the server, but as I see you have mentioned, it's not necessary.

If some of your new suggestions fail, I'll suggest other methods I've used to diagnose or use Internet sharing. I've always used a Linux router for my network. I have two NICs in my Linux server. I also use dhpd on the machine to distribute IP's to the machines on the network.

-- L. James

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

Original Poster
Rep: Reputation: 30
I am sharing internet connection on my centos 5.6 firewall:
#iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
 
Old 07-19-2011, 12:44 AM   #19
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
The windows machine can ping the DNS. Please find attached the output of 'nslookup' .
Attached Thumbnails
Click image for larger version

Name:	nslookup.JPG
Views:	7
Size:	62.3 KB
ID:	7607  
 
Old 07-19-2011, 01:02 AM   #20
Larry James
Member
 
Registered: Jun 2000
Location: Buffalo, New York
Distribution: Fedora, Ubuntu
Posts: 361

Rep: Reputation: 39
Quote:
Originally Posted by hadimotamedi View Post
I am sharing internet connection on my centos 5.6 firewall:
#iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Try manually specifying a name server to Windows.

For Windows 7 try:

Right Click (the Network Icon on the task bar) -> (click) Open Network and Sharing Center -> (click) Change Adapter Settings -> (double click your NIC) -> (click) Properties -> (double click) Ipv4 -> (tick) Use the following DNS server address -> (Type in the IP addresses of the DNS server your CentOS machine is using)

Leave the Obtain an IP address ticked the say you already have it.

You can use this as a temporary DNS resolution while you explore the other suggestions given.

-- L. James

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

Original Poster
Rep: Reputation: 30
The windows machine is win xp and I have manually input DNS servers for it.
 
Old 07-19-2011, 03:00 AM   #22
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
ok, you have not updated the firewall on the linux box to permit dns, so add it. Easiest way for me to describe to you would be to open /etc/sysconfig/iptables and add a line like:

-A RH-Firewall-1-INPUT -p udp -m udp --dport 53 -j ACCEPT

above the line permitting ftp
 
Old 07-19-2011, 04:41 AM   #23
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
I added your mentioned line to my /etc/sysconfig/iptables but still the windows machine cannot browse valid url . Can you please let me know if there is a command to reload the new settings after modifying the above iptables file?
 
Old 07-19-2011, 04:42 AM   #24
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 yeah restart iptables too.

you need to actually understand what you're doing then, if you're just getting spoon fed all this and not having any idea what it means, don't do it.
 
Old 07-19-2011, 05:09 AM   #25
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
Thank you very much for your help. At now,after iptables restart, the windows machine can browse valid url.
Thank you again
 
Old 07-19-2011, 05:13 AM   #26
hadimotamedi
Member
 
Registered: Aug 2009
Posts: 228

Original Poster
Rep: Reputation: 30
Can you please give me a reference link on how can I set security rules through iptables on my centos 5.6 firewall to protect my windows machine?
 
  


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

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

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