LinuxQuestions.org
Visit Jeremy's Blog.
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 05-31-2011, 04:46 AM   #1
nicky77
LQ Newbie
 
Registered: Mar 2010
Posts: 16

Rep: Reputation: 0
Unable to access web server from my machine - network cache issue?


Hi, I have a weird issue where all of the machines in my office can all connect to our web server, either via DNS or using the server IP directly. However, on my machine, which is using the same network IP as the rest of the office and I know it's not being blacklisted, I can't access the server at all via SSH or web or mail. I'm the only machine running Linux, I've flushed the network cache using nscd, but this made no difference. Can anyone think of what might be going on here?
 
Old 05-31-2011, 06:51 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,034

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
When you say "can't," does that mean that you try to connect and are unable to find the server or that you're getting a error message or something else entirely?

How are you finding servers -- via DNS? And, if so, is the address of the DNS server in your /etc/resolv.conf file? Ought to look something like this
Code:
search com
nameserver 68.94.156.1
nameserver 68.94.157.1
(That's two DNS servers, all you really need, but you're going to need some way within your intranet to find servers by name.)

If the server has a fixed-IP address, you could simply put that in /etc/hosts on your machine something like this:
Code:
# For loopbacking.
127.0.0.1               localhost
192.168.1.10            fubar.com fubar
Hope this helps some.
 
Old 05-31-2011, 06:56 AM   #3
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
it could be a routing problem,
or it could be a dns problem
or it could be that the others use a proxy to reach the machine, and you don't.
I suggest you go to the command line, and try on a windows machine and on yours:
ping the server by IP address
telnet to port 80 and issue this command:
GET /
then compare the results and that should help you find the issue
 
Old 06-01-2011, 04:51 AM   #4
nicky77
LQ Newbie
 
Registered: Mar 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks for the replies. Just going through it all now:

/etc/resolv.conf file

# Generated by NetworkManager
nameserver 192.168.0.1


/etc/hosts

127.0.0.1 localhost.localdomain localhost
::1 nicky-desktop localhost6.localdomain6 localhost6
127.0.1.1 nicky-desktop

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

I can ping the server IP fine, but any attempt to connect via ssh or telnet fails with a connection timed out error. The traceroute output is the same on my machine as on windows machines in my office. There's nothing listed on the firewall rules under chain INPUT, FORWARD and OUTPUT.

If there's anything else I can check which might help, grateful for any pointers.
 
Old 06-01-2011, 07:24 AM   #5
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,034

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
The entry in /etc/resolv.conf looks like a router gateway address and that may be a problem.

In my experience (which may have nothing whatsoever to do with your problem but it's worth a shot), routers can serve as a DNS server but they're not refreshed and after some time quit and you can't get anywhere. This has been my experience with Linksys routers and a couple of others than I can't remember the names of. Your intranet should have a DNS server address that is fed to Windows boxes that are connecting with DHCP (which is typical) -- check the address in a Windows box (or just ask the network administrator what the DNS server address(es) are and see if that helps.

The test would be if you can't ping the outside world, say new.google.com, then you don't have a DNS server address specified. Might be worth a couple of minutes to put a public server address in /etc/resolv.conf, for example Google public DNS servers
Code:
search com
nameserver 8.8.8.8
nameserver 8.8.4.4
Note that 192.168.0.1 is a gateway but most likely not a server address (which would be something like 192.168.0.100 or something); you need to find out what that address is. Pinging 192.168.0.1 is the gateway responding to you (so, yeah, you're getting to the gateway) but not the server (so, no, you're not going to get an SSH connection). It's address could be anything but 192.168.0.1.

Hope this helps some.

[EDIT]
Forgot -- if you know the name and address of the server, put that in your /etc/hosts file, won't hurt anything else, probably will help.
[/EDIT]

Last edited by tronayne; 06-01-2011 at 07:58 AM.
 
Old 06-01-2011, 08:43 AM   #6
nicky77
LQ Newbie
 
Registered: Mar 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks @tronayne - I've added the name and address of the server to /etc/hosts, which currently doesn't make a difference. I tried putting the Google DNS servers in /etc/resolv.conf and could ping new.google.com fine. I should point out (and should have clarified this before now) that the server I can't connect to is a remote web server. I can ping the web server by name or IP, but can't make any connection to it. If i look at the server logs, there is no record of any refused connection from my IP (which is probably to be expected).

192.168.0.1 is the address of the netgear router we use in the this office and I am still being assigned the same IP as the other machines running Windows and OS X.

I'm going to look more into the differences between the iconfig output i'm getting and the output on the other machines. In the meantime, any suggestions most welcome!
 
Old 06-01-2011, 09:00 AM   #7
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,034

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
Quote:
Originally Posted by nicky77 View Post
I should point out (and should have clarified this before now) that the server I can't connect to is a remote web server. I can ping the web server by name or IP, but can't make any connection to it. If i look at the server logs, there is no record of any refused connection from my IP (which is probably to be expected).
Are you sure that SSH is running on that server and, if so, at what port number? If it's not the default port number (22), you need to add the port being used to your connection attempt. Too, do you have to be specifically allowed on the server (or tunneled through its IPTABLES or similar)?
 
Old 06-01-2011, 09:10 AM   #8
nicky77
LQ Newbie
 
Registered: Mar 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Yes I can connect fine using SSH on any other machine in the office, just not my own. I've checked with the server admins and they can't see any reason why i shouldn't be able to connect. All very strange - quite possibly something glaringly obvious which I'll kick myself for, but I have no idea what that is right now.
 
Old 06-01-2011, 09:49 AM   #9
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,034

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
Um, the only other thing I can think of is the router -- is it passing port 22 (or whatever the actual port number is)? That typically is not enabled by default in the router setup.
 
Old 06-01-2011, 10:27 AM   #10
nicky77
LQ Newbie
 
Registered: Mar 2010
Posts: 16

Original Poster
Rep: Reputation: 0
I'm just looking at the router config at the moment, i don't seem to have access to the port forwarding info on this unfortunately. Nothing in our internal networking and routing setup has changed at all, just our web server which is external. I get the timeout issue when i try to connect to it via SSH, FTP and HTTP, but these are all using the standard ports and can be accessed fine from any machine other than mine.

Checking iptables on my machine, I get the following, which is probably not all that useful but provides some more detail.

nicky@nicky-desktop:~/AptanaStudio3$ sudo iptables --list
[sudo] password for nicky:
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
 
Old 06-16-2011, 05:30 AM   #11
nicky77
LQ Newbie
 
Registered: Mar 2010
Posts: 16

Original Poster
Rep: Reputation: 0
This may or may not be useful in trying to figure out what's going on here, but I've since had the same issue on a new machine which dual boots Windows 7 and a clean install of Ubuntu. On Windows, I can access the server by host or IP absolutely fine, but on Ubuntu I get the timeout problem. I also tried Linux Mint from the live CD and had the same issue there too. Very strange!
 
  


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
Unable to access file on web server Ryan_Sutton Linux - Newbie 2 11-19-2008 03:21 PM
Transperant Proxy and web server on one machine = issue ... sys7em Linux - Networking 2 06-16-2005 02:29 PM
Unable to access hotmail on win machine with linux server wonderboy1999 Mandriva 4 06-26-2004 08:26 PM
Unable to access to a website on apache web server bisbane Linux - Networking 3 07-11-2001 09:18 AM
Unable to access to a website on apache web server bisbane General 3 07-10-2001 11:03 AM


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