ip-address

Ruby - Platform independent way to determine IPs of all network interfaces?

Is there an easy way in Ruby for me to get a list of the IP addresses for all network interfaces? It needs to work in Linux/Win/OSX and I'd prefer to not have to parse ifconfig/ipconfig unless I absolutely have to. ...

C#: Get IP Address from Domain Name?

How can I get an IP address, given a domain name? For example: www.test.com ...

How to get IPaddress from domain name in java

HI I am writing an application where I need IP address. I have domain name, but I like to know hoe to get IP address from domain name. For ex www.girionjava.com how to get IP address of this by programming in java. Thanks ...

Impact of Changing IP Address of Outgoing IP Packets From My Network

If I modify the source ip address of all outgoing ip packets from my network to an ip address belonging to someone else (while ensuring that the checksum is correct) then what will happen. Assume that I have a public IP address connected by a point-to-point link to an ISP. Will the ISP check that the IP address in my IP packets is corre...

What is this for an IP in my google app engine log file?

I get many normal log lines in my google app engine application. But today I go these instead the 4-part number: 2a01:e35:2f20:f770:6c54:3ee8:67fb:df8 What is this for an format? ipv6 are 6 numbers, mac address too... Normal logfile line: 187.14.44.208 - - [19/Mar/2010:14:31:35 -0700] "GET /geo_data.js HTTP/1.1" 200 776 "http://www...

Why does socket.inet_ntoa returns packed format in python

Why does socket.inet_aton returns packed format in python? If I am storing the IP as integer in Database (mysql), do I have to always extract the integer value or is there any easier way out? ...

PHP $_SERVER['REMOTE_HOST'] returns ::1

Hi I am trying to get the IP address of the website visitor in PHP. I'm expecting $_SERVER['REMOTE_HOST'] to return something like 127.0.0.1, but it's returning ::1. Kind regards Peter ...

How to fake source ip-address of a udp-packet?

Hi everyone! Think about the following: Your ISP offers you a dynamic ip-address (for example 123.123.123.123). My question is simple (the answer may not be): Is it possible to send a single udp-packet with an outer source-ip (for example 124.124.124.124) to a fixed-ip server? I don't need to get a answer from the server. I just want ...

How to code feature on checking visitor IP address in PHP ?

i still confused on this subject And ask for any help and reference on how to check visitor IP address via PHP. i'm know it seem lazy to ask something before attempt to code something to show. but right now, i also googling to find it. hopefully someone can give general broad answer or some link to read. btw, what to be consider when ...

Given an IP address and subnetmask, how do I calculate the CIDR ?

Ok I can't seem to figure this out: given the following: IP address = 192.168.1.0 Subnetmask = 255.255.255.240 Using c#, how do I calculate the CIDR notation 192.168.1.0/28 ? Is there an easy way to achieve this? Am I missing something? Thanks! ...

Python - create blacklist file of IP addresses that have more than 5 failed login attempts in the authlog

Basically I have an authlog/syslog file with a list of log in attempts and IP addresses - I need to make a Python program that will create a txt file with all the IP addresses that have more than 5 failed login attempts - a sort of "blacklist". So basically something like: if "uniqueipaddress" and "authentication failure" appear more t...

Scrubbing IPv4 dotted-quad addresses in SQL

Given a table containing dotted quad IPv4 addresses stored as a VARCHAR(15), for example: ipv4 -------------- 172.16.1.100 172.16.50.5 172.30.29.28 what's a convenient way to SELECT all "ipv4" fields with the final two octets scrubbed, so that the above would become: ipv4 ------------ 172.16.x.y 172.16.x.y 172.30.x.y ...

Best practice for assigning A/B test variation based on IP address

I am starting to write some code for A/B testing in a Grails web application. I want to ensure that requests from the same IP address always see the same variation. Rather than store a map of IP->variant, is it OK to simply turn the IP address into an integer by removing the dots, then use that as the seed for a random number generator...

How to access Java servlet running on my PC from outside ?

I used Netbeans6.7 to write a servlet, when it runs, it opens a browser window with this address : http://localhost:8080/My_App/Test_Servlet, I replaced the "localhost" with my IP address, now it looks like this : http://192.???.1.??:8080/My_App/Test_Servlet, but I tried to access it from another computer outside my home, it can't read a...

Most efficient way to store IP Address in MySQL

What is the most efficient way to store and retrieve IP addresses in MySQL? Right now I'm doing: SELECT * FROM logins WHERE ip = '1.2.3.4' Where ip is a VARCHAR(15) field. Is there a better way to do this? I'm using Python. ...

IP Address Lookup in VB.net (XP vs Windows 7)

Currently I use the following code to retrieve the IP address of the local workstation... strIPAddress = System.Net.Dns.GetHostEntry(strComputerName).AddressList(0).ToString() This is fine for the Windows XP workstations. However, in Vista and Windows 7, this returns the IPv6 address which is not used at all. Is there a method of sett...

Socket Communication C#- IP Address

I have a socket application which I can use in local network, at home. I can make them communicate for example from 192.168.x.x to 192.168.y.y ip addresses. What should I do if I want to use the application over internet, from a remote machine, not local. For example which ip addresses should I use if my friend who lives another country...

Determine Host or IP from domain user

Is there any way, on a windows domain, to get hostname or IP address given the domain username? C# APIs would be great. example: string GetUserIP(string username); ...

REMOTE_ADDR and IPv6 in PHP

Is it safe to assume that $_SERVER['REMOTE_ADDR'] always returns a IPv4 address? Thanks! ...

Get User's IP Address

Hi, How can I get the current visitors IP address? ...