Hot answers tagged

6

In addition to Tony┬┤s answer, of querying OpenDNS, which I use in my scripts upon logging on to my servers to display both the local machine and remote public IP address: echo `hostname` `hostname -i` `dig +short +time=1 myip.opendns.com @resolver1.opendns.com` Google also offers a similar service. dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | ...


4

You can only do this if your modem or router provide a way to query that information. The IP address is assigned to the WAN / Internet facing interface on the router or modem, so you need to be able to query that, or connect to an Internet service which then tells you what it was. You can use DNS to get a response, using this, dig +short ...


3

If your asking device already has an IP address then it's possible to get a fair attempt with ping if ping -c1 -w3 10.11.12.13 >/dev/null 2>&1 then echo "Ping responded; IP address allocated" >&2 else echo "Ping did not respond; IP address either free or firewalled" >&2 fi Notice that it's not possible to use this technique ...


3

As a rule of thumb, for internal services use the private IP address, for services with outside visibility use the public IP address. So, any communication between local servers in the same network will be using the private IP address (e.g. for instance the webfrontend communicating with a mySQL server); any services being given to the outside you use the ...


2

The output ping and netstat command confirms that all is fine with routing. However DHCP also gives DNS/resolver setup data. The DNS resolution is failing. Please edit your /etc/resolv.conf and fill it in as: nameserver 8.8.8.8 ping google.com should be working then. Later on talk with your company, and ask them the internal domain (yourdomain.xx) and ...


2

1) You can use dig (domain information groper) command: dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'"' '{ print $2}' or : dig TXT +short o-o.myaddr.l.google.com @ns1.google.com 2) You can try host command : host myip.opendns.com resolver1.opendns.com 3) using 3rd party web-sites through the command curl or wget: curl ...


2

There are a number of reasons why Server A might not be able to connect to Server B, including hardware and software firewalls, network routing, block lists, etc. There's nothing about your two initial connections that must make the third one true (i.e. A -> B and A -> C does not imply B -> C will work). Without more details no one will be able to say ...


2

In one sense this is impossible. You can ask for a specific IP from a DHCP server. IPv6 performs Duplicate Address Detection automatically. In IPv4, DHCP clients are supposed to check for duplicate addresses using ARP (or equivalent). The standard tools don't check for IPv4 collisions for static addresses though (unlike Windows). But if you check for an ...


1

ifconfig does not show output, probably because by the time itruns, the networking setup is not fully completed. Furthermore, there are not 100% guarantees the dynamic IP address wont change over the server uptime. If using dhclient, move the script to the directory /etc/dhcp/dhclient-exit-hooks.d, so it executes after getting an IP address via DHCP. ...


1

It could be done on a distributed system but that's not likely the case as it would make it more expensive and complicated to run. Even with a distributed system, you could never have enough servers to be perfectly aware of specific network outages. Furthermore, your total load and bandwidth would always be in function of the number of servers, which is ...


1

Got the solution, i need to start mu UML process as root, after which configuring ip address will bring the interface up. Just run the uml as root : sudo ./linux ubda=Fedora21-x86-root_fs


1

The -A INPUT -s adds a rule for any packets with the source subnets specified on the line. Therefore, in your example, you are logging and dropping all packets that have a source IP address that starts with 255 and all that start with 0, such as 255.1.2.3.4 or 0.56.78.90 The idea here is that there should will never be packets that start with those ...


1

The file you need to make or edit is called ifcfg <interface>, where <interface> could be e.g. eth0 or eth1. On Freebsd and Debian I used :ifconfig <interface> <ip address> <netmask> and it worked please try it.



Only top voted, non community-wiki answers of a minimum length are eligible