ip

IP to Country?

Does anyone know of a simple way to retrieve the country for a given IP Address? Preferably in ISO_3166-1 format?...

How can I determine the IP of my router/gateway in Java?

How can I determine the IP of my router/gateway in Java? I can get my IP easily enough. I can get my internet IP using a service on a website. But how can I determine my gateway's IP? This is somewhat easy in .NET if you know your way around. But how do you do it in Java? ...

Change IP address via shellscript on Slackware

In a shellscript, I'd like to set the IP of my box, run a command, then move to the next IP. The IPs are an entire C block. The question is how do I set the IP of the box without editing a file? What command sets the IP on Slackware? Thanks ...

Reverse DNS lookup in perl

How do I perform a reverse DNS lookup, that is how do I resolve an IP address to its DNS hostname in Perl? ...

How can I specify the local address on a java.net.URLConnection?

My Tomcat instance is listening to multiple IP adress, but I want to control what source IP address is used when opening a URLConnection. How can I specify this? ...

What is the difference between 0.0.0.0 and 255.255.255.255 in IPv4?

I've heard some people say the IPv4 broadcast address is 0.0.0.0 and others say it is 255.255.255.255... would someone explain the real-world difference? ...

How to route in linux

Hi, I have 20 ips from my isp. I have them bound to a router box running centos. What commands, and in what order, do I set up so that the other boxes on my lan, based either on their mac addresses or 192 ips can I have them route out my box on specific ips. For example I want mac addy xxx:xxx:xxx0400 to go out 72.049.12.157 and xxx:xxx...

Checking IP Port State Remotely

I found an article on getting active tcp/udp connections on a machine. http://www.codeproject.com/KB/IP/iphlpapi.aspx My issue however is I need to be able to determine active connections remotely - to see if a particular port is running or listening without tampering with the machine. Is this possible? Doesn't seem like it natively,...

Sending an HTTP request to a different IP than what the hostname resolves to?

I want to be able to send an HTTP request to "admin.foo.com", but have the request go to an IP which does not map to "admin.foo.com" in DNS. I know I can edit /etc/hosts to do this, but I'd like to avoid doing that. To explicate, normally when you browse to "http://admin.foo.com", it sends an HTTP request that looks something like this...

192.168.0.71... What is this special address used for?

I have some accesses from 192.168.0.71 on my apache logs. I looked up this IP (because my server almost exclusively takes requests from 127.0.0.1, and I saw that it's reserved for "special purposes." What types of purposes might those be? Edit: I didn't tell you, typing 192.168.0.71 brings me straight to my site, just as 127.0.0.1 ...

Writing a reliable, totally-ordered multicast system in Python

I have to write a reliable, totally-ordered multicast system from scratch in Python. I can't use any external libraries. I'm allowed to use a central sequencer. There seems to be two immediate approaches: write an efficient system, attaching a unique id to each multicasted message, having the sequencer multicast sequence numbers for ...

Get my WAN IP address

How can i go about programaticaly getting the IP address of my network as seen from the Internet? Its obviously a property that my router has access to when it connects to the ISP. Is there any way to get this info from a router using a standard protocol. My only other option is to either find a WS which returns my IP address (suprisingl...

How do I find the DHCP assigned IP address via bash on Fedora?

Is there a command within the bash shell of fedora that will give me the currently assigned IP address? ...

SAAS per seat authentication

Hi Our company makes the web based application which is priced per workstation. That means that user/pass credentials should only be used from one particular machine. Currently what is happening that several users are sharing credentials and we do not have any way to prevent this if they are not doing it concurrently. The nature o...

Best tutorial for application multicasting?

I've recently become aware that there's a distinction between IP multicasting (which apparently doesn't work that well on the public internet) and application multicasting (which is apparently used in IRC and PSYC, per http://en.wikipedia.org/wiki/Multicast). Is there a good tutorial on implementing application-level multicasting? I th...

How does geographic lookup by IP work?

Is which IPs are assigned to which ISPs public information? How do geo IP services obtain this information and maintain this information? How can I personally figure out where a certain IP belongs without using one of these services? ...

How to find a locally available UDP port with unix Sockets API

I have an application where I have potentially many processes must send a message to one process. I figured the most expedient way to do this would be to just send a UDP datagram. When opening a socket, I need to specify which port to listen to. As I just want to fire and forget the UDP datagram, I'd like to just have the OS pick an a...

How do I make an outgoing socket to a SPECIFIC network interface?

I have a server with two different network interfaces, each with a different IP address. How can I create a socket so it'll go out a specific IP address? I'd prefer a python example, but the question is language agnostic, so shoot away. EDIT: Please don't give me "You can't" as an answer. I mean, it is a computer. I can do anything I l...

Linux: retrieve per-interface sent/received packet counters (ethernet, ipv4, ipv6)

On Linux, how can I (programmatically) retrieve the following counters on a per-interface basis: Sent/received ethernet frames, Sent/received IPv4 packets, Sent/received IPv6 packets. ...

How do I detect whether a given IP is in a given subnet in Javascript?

I'd like to write a function in Javascript along the lines of: in_subnet(ip, network, slash) { ... } in_subnet('1.2.3.4', '1.2.0.0', 16) # True, since it's in 1.2.0.0/16 in_subnet('1.2.3.4', '1.2.0.0', 24) # False, since it's not in 1.2.0.0/24 Should I write it from scratch, or are there some good libraries I could use? Or is the...