Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I am working behind a http proxy (172.30.x.x:3128). I have configured it in my terminal. All the applications such as wget,lynx firefox etc. are working correctly.However all dns utilities like nslookup, host and even ping too are not working.Following is output of host command:
Code:
root@ding:~# host google.com
;; connection timed out; no servers could be reached
Output of host -T:
Code:
root@ding:~# host -T google.com
;; Connection to 4.2.2.2#53(4.2.2.2) for google.com failed: connection refused.
similarly for nslookup:
Code:
root@ding:~# host google.com
;; connection timed out; no servers could be reached
ping doesn't give any output at all just hangs there.
Linux ding 2.6.30.9 #1 SMP Tue Dec 1 21:51:08 EST 2009 i686 GNU/Linux
Using Backtrack 4
To connect to net I have to first run dhclient3(learnt from this forum!).It gives me my ip but where is dns address sent I don't have and idea. Kindly do help me about as I am learning about these stuff and doesnot have clear idea how all that dns etc. works.
Thanks in advance
If the proxy is an http proxy, as in a proxy only for *http*, then it might be configured to not allow
other types of communication through. The facilities you mentioned, wget, lynx, and firefox, use http,
typically via port 80 ( at the far end ). The other commands you mentioned, use other ports, such
as port 53 for dns, etc. You need to find to double check how the proxy is intended to function.
You should check to see what the proxy server uses for a DNS server, and attempt to use that. Sounds like whatever that network uses for a firewall isn't allowing outbound DNS queries from your system. If your network has an internal DNS server, try using it.
You could also point DNS queries at the proxy server. It could possibly be acting as a DNS server too.
Too many unknowns to give definitive answers. Something, somewhere in this network is allowed to query public DNS servers. I'm guessing you are using a static IP on your system. If there is a dhcp server configured in the environment, you could configure your system for a dhcp lease, and possibly see what the DNS servers are that are assigned with the lease.
I don't know what your environment is like, and whether you should be poking around the network, either. I once worked for a networking security company where we provided firewalls and IDS/IPS units for mainly financial institutions. Many of the networks we protected where extremely restrictive in what client systems could, and could not do. If you are at work, just be careful, and abide by whatever protocols/policies the company has established.
If the proxy is an http proxy, as in a proxy only for *http*, then it might be configured to not allow
other types of communication through. The facilities you mentioned, wget, lynx, and firefox, use http,
typically via port 80 ( at the far end ). The other commands you mentioned, use other ports, such
as port 53 for dns, etc. You need to find to double check how the proxy is intended to function.
Thanks for reply. Yes what you say seems to be true. Although the proxy provided(squid) is not under my control(give by college admin.) but its behaviour is as you said.All other traffic are banned I suppose except http and ftp.Any way to redirect them to these ports.
Yes what you say seems to be true. Although the proxy provided(squid) is not under my control(give by college admin.) but its behaviour is as you said.All other traffic are banned I suppose except http and ftp.Any way to redirect them to these ports.
You should check to see what the proxy server uses for a DNS server, and attempt to use that. Sounds like whatever that network uses for a firewall isn't allowing outbound DNS queries from your system. If your network has an internal DNS server, try using it.
You could also point DNS queries at the proxy server. It could possibly be acting as a DNS server too.
Too many unknowns to give definitive answers. Something, somewhere in this network is allowed to query public DNS servers. I'm guessing you are using a static IP on your system. If there is a dhcp server configured in the environment, you could configure your system for a dhcp lease, and possibly see what the DNS servers are that are assigned with the lease.
I don't know what your environment is like, and whether you should be poking around the network, either. I once worked for a networking security company where we provided firewalls and IDS/IPS units for mainly financial institutions. Many of the networks we protected where extremely restrictive in what client systems could, and could not do. If you are at work, just be careful, and abide by whatever protocols/policies the company has established.
If you're at home, have at it.
Thaks for reply.Actually the proxy is provided by college admin. Its some squid proxy on linux server(got this info by some bad page request!).I do get my ip through dhcp(via dhclient3 command). But I don't know how to get the internal DNS adress(only way I know is that of "resolv.conf" which gives strange 4.2.2.2 address). Can you guide me further.
Type in root console:
dhcpcd -T <interface>, like for ex. dhcpcd -T eth0 or wlan0, depend on through which interface you are connected.
It gives to see all you a dhcp response.
Also try to "ping 208.67.222.222", and if you can ping it try "telnet 208.67.222.222 53"
If you wont be able to ping and telnet, I would thing your admin use not only proxy, but also firewall and netfilter.
...But I don't know how to get the internal DNS adress(only way I know is that of "resolv.conf" which gives strange 4.2.2.2 address). Can you guide me further.
I thought that I recognised that 4.2.2.2 as a well-known dns provider that I had once used (& thought that I'd reply as it made me look like the kind of person who kept their mental DNS database up-to-date), but I was wrong. Maybe I was getting confused with:
Quote:
The Google Public DNS IP addresses are as follows:
8.8.8.8
8.8.4.4
(although, OpenDNS
Quote:
Put these nameserver addresses as your ‘DNS Servers’: 208.67.222.222, 208.67.220.220
works, too.)
Note that
Quote:
I am working behind a http proxy (172.30.x.x:3128)
means that for the normal http case, the squid proxy will do the resolution, so the fact that resolutions requested via the proxy work, doesn't mean that your basic look up set-up is correct.
Type in root console:
dhcpcd -T <interface>, like for ex. dhcpcd -T eth0 or wlan0, depend on through which interface you are connected.
It gives to see all you a dhcp response.
Also try to "ping 208.67.222.222", and if you can ping it try "telnet 208.67.222.222 53"
If you wont be able to ping and telnet, I would thing your admin use not only proxy, but also firewall and netfilter.
Thanks for reply!
Tried the command which you said and got following output.Now here which one should I use for dns ip kindly tell:
I thought that I recognised that 4.2.2.2 as a well-known dns provider that I had once used (& thought that I'd reply as it made me look like the kind of person who kept their mental DNS database up-to-date), but I was wrong. Maybe I was getting confused with:
(although, OpenDNS
works, too.)
Note that means that for the normal http case, the squid proxy will do the resolution, so the fact that resolutions requested via the proxy work, doesn't mean that your basic look up set-up is correct.
Thanks for reply!
tried both google and OpenDNS dns address in /etc/resolv.conf but no use.
Is there any way I can carry out these commands on some http port (I wonder how my mozilla firefox browser and wget are doing it.)
It's just a long shot, but sometimes the proxy server address can be used as the DNS server address. Have you tried using 172.30.104.1 as the nameserver address in your resolv.conf ?
It's just a long shot, but sometimes the proxy server address can be used as the DNS server address. Have you tried using 172.30.104.1 as the nameserver address in your resolv.conf ?
Thanks for reply!
Sorry,this way also failed.I think its totally banned by college admin.
Are there any other http based alternatives for these commands on linux. If yes please kindly tell them. It would be very nice if they are commandline based(linux) so that I can record my findings easily. Mainly I need alternatives for these commands:
host
nslookup
whois <--web based alternatives are there for these but I want something to run through terminal.
Waiting eagerly for your kind replies.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.