Operating System - Linux
1748146 Members
3803 Online
108758 Solutions
New Discussion юеВ

No Internet access from redhat linux 5.5

 
SOLVED
Go to solution
Mousa55
Super Advisor

No Internet access from redhat linux 5.5

Hi All,

I cannot access INTERNET from redhat linux 5.5.
i set the proxy ip from firefox on network setting. and i set the DNS ip on /etc/resolv.conf file as below
10.15.1.2 rhdc01
10.15.1.3 rhdc02
put still I cannot access INTERNET or ping to any site.

Thanks
8 REPLIES 8
Matti_Kurkela
Honored Contributor
Solution

Re: No Internet access from redhat linux 5.5

What's the error message displayed by Firefox?

>i set the DNS ip on /etc/resolv.conf file as below
>10.15.1.2 rhdc01
>10.15.1.3 rhdc02

That's the syntax for /etc/hosts, not for /etc/resolv.conf.

If those are your DNS servers, you should set /etc/resolv.conf like this:

nameserver 10.15.1.2
nameserver 10.15.1.3

If that isn't the problem, please run:

nslookup www.google.com

and post the output.
From the output, it is possible to determine:
- can your system connect to the nameserver at all?
- does the nameserver reject your request?
- can the nameserver connect to other Internet nameservers to find the answer you're looking for?
In each of these cases, the answer will be different.

You might also verify your proxy is reachable. Use a command like "telnet ": if it says "Connection established", your system can at least reach the proxy.

For example, if your proxy IP is 10.11.22.33 and the proxy port is 8080, run:

telnet 10.11.22.33 8080

If it seems to hang, wait for up to 2 minutes. It should eventually abort with a "Connection timed out" error message in that case. That usually means a firewall is preventing you from accessing that service on that host, but might also indicate other problems in the network connectivity.

If the telnet command stops immediately with a "Connection refused" error message, it might mean the proxy service is not running on that host. Or it might still be a firewall issue.

MK
MK
Mousa55
Super Advisor

Re: No Internet access from redhat linux 5.5

Hi,
=========================
>What's the error message displayed by Firefox?

Failed to Connect
Firefox can't establish a connection to the server at www.redhat.com.
=========================
# more /etc/resolv.conf

nameserver 10.15.1.2
nameserver 10.15.1.3
=========================
# nslookup www.google.com

[root@syslog ~]# nslookup www.google.com
Server: 10.15.1.2
Address: 10.15.1.2#53

Non-authoritative answer:
www.google.com canonical name = www.l.google.com.
Name: www.l.google.com
Address: 74.125.95.147
Name: www.l.google.com
Address: 74.125.95.99
Name: www.l.google.com
Address: 74.125.95.103
Name: www.l.google.com
Address: 74.125.95.104
Name: www.l.google.com
Address: 74.125.95.105
Name: www.l.google.com
Address: 74.125.95.106
=========================

# telnet 10.15.1.150 8080
Trying 10.15.1.150...
telnet: connect to address 10.15.1.150: No route to host
telnet: Unable to connect to remote host: No route to host
=========================
when i disable the firewall, the output is same
# telnet 10.15.1.150 8080
Trying 10.15.1.150...
telnet: connect to address 10.15.1.150: No route to host
telnet: Unable to connect to remote host: No route to host
=========================
Thanks
Mousa55
Super Advisor

Re: No Internet access from redhat linux 5.5

Hi,
=========================
>What's the error message displayed by Firefox?

Proxy Server Refused Connection
Firefox is configured to use a proxy server that is refusing connections.
=========================

Thanks
Matti_Kurkela
Honored Contributor

Re: No Internet access from redhat linux 5.5

Looks like your DNS servers are working perfectly.

You're getting a "No route to host" error when attempting to connect to the proxy. This means: either your server, or a network router between your server and the proxy "thinks" it's impossible to make a network connection from your server to the proxy IP.

Check your netmask and default gateway address settings. You can view the settings with commands "ifconfig" and "route -n". The default gateway is listed in the *last* line of "route -n" output.

If the settings are correct in your server, talk to the person responsible for configuring and maintaining the network at your site: there might be a problem in the network. (Or perhaps someone told you a wrong netmask or gateway setting.)

MK
MK
Mousa55
Super Advisor

Re: No Internet access from redhat linux 5.5

Hi,
=========================
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.15.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth2
0.0.0.0 10.15.1.1 0.0.0.0 UG 0 0 0 eth2
=========================
# ifconfig
eth2 Link encap:Ethernet HWaddr 00:15:60:0E:EC:7B
inet addr:10.15.1.5 Bcast:10.15.1.255 Mask:255.255.255.0
inet6 addr: fe80::215:60ff:fe0e:ec7b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:50173 errors:0 dropped:0 overruns:0 frame:0
TX packets:16505 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6956614 (6.6 MiB) TX bytes:11072793 (10.5 MiB)
=========================
but when i use the nslookup command i see this output

# nslookup 10.15.1.5
Server: 10.15.1.2
Address: 10.15.1.2#53

** server can't find 5.1.15.10.in-addr.arpa.: NXDOMAIN


** server can't find 5.1.15.10.in-addr.arpa.: NXDOMAIN

# nslookup syslog.sp.local
Server: 10.15.1.2
Address: 10.15.1.2#53

** server can't find syslog.sp.local: NXDOMAIN
=========================
# more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost loopback
::1 localhost6.localdomain6 localhost6
10.15.1.5 syslog.sp.local
=========================
and all other settings it's correct.

Thanks
Matti_Kurkela
Honored Contributor

Re: No Internet access from redhat linux 5.5

> ** server can't find 5.1.15.10.in-addr.arpa.: NXDOMAIN

The DNS server is telling you it cannot find a reverse-mapping record for the IP address you asked for. NXDOMAIN = Non-eXistent domain, the standard DNS server reply that means "According to all information available to me, what you asked for does not exist".

In Linux, the "nslookup" command does not use /etc/hosts. It will always use DNS servers only.

If you want to make a test query using whatever hostname resolution mechanisms are configured (i.e. just like a normal application does it), use the "getent" command:

getent hosts 10.15.1.5

If the response is "10.15.1.5 syslog.sp.local", then you've confirmed that /etc/hosts lookup works.

(The "hosts" in the command line does not refer to /etc/hosts, but to the type of data queried: you can also do things like "getent passwd root". That might be useful if you're using LDAP or NIS for user account information but also have some local system accounts configured.)


Your IP address is 10.15.1.5 and your netmask is 255.255.255.0 (also known as /24). Assuming that these settings are correct for your network, your proxy server 10.15.1.150 should be reachable without going through any gateways.

If the proxy is still not reachable, please run this command:

ping -c 4 10.15.1.150; arp -vn

It sends four pings to the proxy, waits awhile for answers, then prints out the ARP table of your host. (The ARP table entries can expire fairly quickly, so the table should be printed out immediately after pinging the target host or doing something else that causes a connection attempt.)

What does the HWaddress field of the "arp -vn" output say for 10.15.1.150?

If it contains the correct MAC address of your proxy server, then the proxy server is reachable at the hardware level: perhaps iptables firewall rules in either your server or the proxy might be blocking the traffic between them.

If it contains some other MAC address, you might have an IP address conflict: both the proxy server and a server with this other MAC are claiming to have IP address 10.15.1.150, and the other server just happened to answer first.

But if the HWaddress field for 10.15.1.150 says "(incomplete)", then the proxy server is not reachable in your network segment. In that case, you should talk to your network administrator, and ask questions like:
- is netmask 255.255.255.0 correct for your server and/or the proxy?
- are the switch ports of your server and the proxy server configured to the same VLAN (if applicable)?
- what network hardware is between your server and the proxy server, and could any of it be used to diagnose the connectivity problem further?

And by the way, if you need a proxy to access external websites, you will most likely be unable to ping external sites: a WWW proxy will only pass through valid HTTP (and maybe HTTPS) requests, not pings.

MK
MK
Jimmy Vance
HPE Pro

Re: No Internet access from redhat linux 5.5

As it appears you can't access any other devices on the network, are you sure your connected to the proper NIC port? You haven't mentioned the server model, but from your postings it has at least threee NICs. Depending on how the kernel handles the PCI bus enumeration what you think is eth2 may not be what the kernel thinks is eth2. Try moving the cable to the other ports and see if you can ping another known device.


No support by private messages. Please ask the forum! 
Mousa55
Super Advisor

Re: No Internet access from redhat linux 5.5

Hi All,

the problem from proxy ip

thanks for all