LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 09-04-2005, 04:35 AM   #1
bruse
Member
 
Registered: Feb 2005
Location: internet
Distribution: Debian
Posts: 821

Rep: Reputation: 30
get ip address.


mandrake 10.0


i am connected to ineternet by an proxy server.


student@linux:~> wget www.linuxquestions.org
--15:13:18-- http://www.linuxquestions.org/
=> `index.html'
Connecting to 10.1.1.50:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: unspecified [text/html]

[ <=> ] 31,006 3.75K/s

15:13:31 (3.75 KB/s) - `index.html' saved [31006]

student@linux:~>


i can not get IP using dig or nslookup becuase i have some problem.

when i using wget it passes through the proxy server.

with ths can i get the IP address of www.linuxquestions.org sever.
 
Old 09-04-2005, 05:19 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
To fix this, you need to set up a nameserver, by adding this line to your /etc/resolv.conf file:
Code:
nameserver IP
where IP is the IP address of a DNS nameserver. Your ISP should be able to tell you which IP address to use, and you can repeat this line if they tell you multiple addresses.

Hope that helps.
 
Old 09-04-2005, 05:51 AM   #3
bruse
Member
 
Registered: Feb 2005
Location: internet
Distribution: Debian
Posts: 821

Original Poster
Rep: Reputation: 30
linux:~ # cat /etc/resolv.conf
### BEGIN INFO
#
# Modified_by: dhcpcd
# Backup: /etc/resolv.conf.saved.by.dhcpcd
# Process: dhcpcd
# Process_id: 8645
# Script: /sbin/modify_resolvconf
# Saveto:
# Info: This is a temporary resolv.conf created by service dhcpcd.
# The previous file has been saved and will be restored later.
#
# If you don't like your resolv.conf to be changed, you
# can set MODIFY_{RESOLV,NAMED}_CONF_DYNAMICALLY=no. This
# variables are placed in /etc/sysconfig/network/config.
#
# You can also configure service dhcpcd not to modify it.
#
# If you don't like dhcpcd to change your nameserver
# settings
# then either set DHCLIENT_MODIFY_RESOLV_CONF=no
# in /etc/sysconfig/network/dhcp, or
# set MODIFY_RESOLV_CONF_DYNAMICALLY=no in
# /etc/sysconfig/network/config or (manually) use dhcpcd
# with -R. If you only want to keep your searchlist, set
# DHCLIENT_KEEP_SEARCHLIST=yes in /etc/sysconfig/network/dhcp or
# (manually) use the -K option.
#
### END INFO
search h@h@
nameserver 10.1.1.1
nameserver 10.1.1.2

linux:~ #

linux:~ # dig google.com

; <<>> DiG 9.2.3 <<>> google.com
;; global options: printcmd
;; connection timed out; no servers could be reached
linux:~ #

how to do?
 
Old 09-04-2005, 06:20 AM   #4
rmic
LQ Newbie
 
Registered: Aug 2005
Posts: 10

Rep: Reputation: 0
Hi,

- Are you able to "go" outside your network (just ping a numeric ip) or is some firewall blocking you from doing this ?

Some of the answers you are looking for may be in the comment at the beggining of your /etc/resolv.conf file.

If you know the addresses of dns servers you can have access to, you could set them in your /etc/resolv.conf file and set your MODIFY_RESOLV_CONF_DYNAMICALLY environment variable to no or change the addresses of the dns servers in the configuration file of the dhcp server (if you have access to it, of course)



rmic
 
Old 09-04-2005, 06:23 AM   #5
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
You seem to be getting your network configuration through DHCP, so the best way to fix this would be to fix the DHCP server to return the right IP address for the nameservers.

But since I don't know anything about your nameserver, I'll tell you how to override the setting on your linux box.

1) As root, edit the file /etc/sysconfig/network/config.

2) Remove these lines if they exist:
Code:
MODIFY_RESOLV_CONF_DYNAMICALLY=yes
MODIFY_NAMED_CONF_DYNAMICALLY=yes
2) Add these lines:
Code:
MODIFY_RESOLV_CONF_DYNAMICALLY=no
MODIFY_NAMED_CONF_DYNAMICALLY=no
3) Save the file.

4) As root, edit /etc/named.conf

5) Remove the line
Code:
search h@h@
6) Make sure that the values on nameserver are correct.

If it still doesn't work, then this looks like a routing or firewall problem. Make sure that you have permission to send UDP packets to the firewall, and you haven't blocked incoming UDP packets from the nameserver.
 
  


Reply



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
dhcp no ip address and netmask dont match route address pengy666 Linux - Wireless Networking 1 05-08-2005 09:33 AM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
DHCP Server MAC Address found, IP address not assigned wmburke Linux - Wireless Networking 17 11-17-2004 10:33 AM
problem to print source address and destination address jooboo Programming 2 11-26-2003 03:24 PM
Should i use the eth0 ip address of my internet ip address when applying iptables ForumKid Linux - Security 2 01-03-2002 08:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:16 PM.

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
Open Source Consulting | Domain Registration