what IPs point to my server box?
I'd like to know if there's a command I can run that will tell me what IP addresses point to my server box. Is there such a thing?
|
What do you mean by 'point to'? You can see what ip addresses are assigned to your cards with /sbin/ifconfig.
|
Quote:
If you want a list of all the addresses that have accessed your Apache web server you can get it from the access log. Something like: Code:
cat /var/log/httpd/access_log | cut -d ' ' -f 1 | sort | uniq |
if you want to know the external IP of your server run this command on your server
wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//' |
It is my understanding that a server can be accessed by multiple IP addresses if it is configured to respond to them and if the network topology knows to refer requests for those IPs to that particular server. I'm not talking about which IP addresses have requested files from apache.
I'd like to know how to find out which IP addresses my server is configured to occupy and serve requests for. Sorry I'm not explaining this better. I'd very much like to know the proper jargon. I think beadyallen has the right idea. The output is pretty verbose though. It looks something like this for a machine I have access to: Code:
server:~# ifconfig |
inet addr:67.14.192.54 Bcast:67.14.192.255 Mask:255.255.255.0
inet addr:67.14.192.55 Bcast:67.14.192.255 Mask:255.255.255.0 inet addr:67.14.192.56 Bcast:67.14.192.255 Mask:255.255.255.0 Although the last two aren't likely to work since they're configured on the same subnet as the first one, but on a separate ethernet interface. Unless you're running the ip2 stack, it's not going to be about to route return traffic out eth2 properly, so you'll end up with "triangular routing"... i.e. packets come in eth2, but the replies go out eth1 which results in the connection hanging since the replies are coming from the "wrong" IP. Edit: Actually it looks like they all are being routed properly, so either the system is using the ip2 stack, or there's a firewall in front that is rewriting the source IPs to match the original request. |
Quote:
What is a "ip2" stack? |
http://tldp.org/HOWTO/Adv-Routing-HOWTO/
It's a combination of extended APIs and userland tools to implement more complex routing than what is possible using the standard tools (ifconfig/route/arp). |
All times are GMT -5. The time now is 12:29 AM. |