ip-address

How can I match an IP address in Perl?

I have a local DNS script that I've inherited from a past employee that needs to compare some values to see if they match specific MX records and IP addresses. The MX part I have down okay: 120 $doug = doug.local 139 if ($mx_record =~ /$doug/) { 140 print ("Mail on doug.\n"); 141 } 142 else { 143 print (...

get ip address (when no ASP.NET available (on linux server))

I can't find the ip address without the aspx page (so on a linux server). If it can work through wcf then its also good. ...

T-Sql: check if IP matches netmask

My SQL-Server db stores IP netmasks as binary. I need a way to match these with a given IP for example: is 192.168.21.5 part of a netmask which is stored in the db? the binary representation of 192.168.21.5: 11000000.10101000.00010101.00000101 (without the dots) Netmask stored in db is: binary(4) and a tinyint field 11000000.1010100...

Why is urlfetch throwing Download Errors when calling some Google services?

I've noticed that some Google services are blocking requests from App Engine servers, resulting in a urlfetch DownloadError. An example would be a feedproxy.google.com url (http://feedproxy.google.com/~r/blabbermouth/~3/cAk78LX4gJE/news.aspx, for example). This occurs on all the apps I've tried it on, including app IDs I've never used f...

Do all web requests contain the requestor's IP?

Am I able to depend on a requestor's IP coming through on all web requests? I have an asp.net application and I'd like to use the IP to identify unauthenticated visitors. I don't really care if the IP is unique as long as there is something there so that I don't get an empty value. If not I guess I would have to handle the case where ...

Country name from php

Hi How to get country name from an Ip address using Php with out using a commercial GeoIP Region Edition. Please does any one help me? ...

Country name from an Ip address with free IP geolocation webservice

Hi , First of all thanks to all .... I read that i can use the free IP geolocation webservice to get Country name from an Ip address. But how i get the response to my site , Actually this is what i look , In my site there is a need of displaying the country name from Ip address. Can uou please tell in detail... How can i display the c...

Specify the outgoing IP address to use with TCPClient / Socket in C#

I've a server with several IP Addresses assigned to the network adapter. On that server is a client app to connect to another server app via TCPClient. For all outgoing communications my servers default IP address is being used, however for this one application I'd like the outgoing communication to be send out on another local IP addre...

IP address SQL injection

Is it possible for a user to forge the result that is returned from $_SERVER['REMOTE_ADDR'] in PHP so they could in theory use SQL injection on a database? This is a bit dumb, but I'm still new enough to PHP that I want to know if it can be done, whether or not I need to sanitize database input when the SELECT statement chooses from IP...

how to get ip address of machine in c#

how to get ip address of machine in c# ...

Unexpected behavior when printing 4-byte integer byte by byte.

I have this sample code for converting 32 bit integers to ip addresses. #include <stdio.h> int main() { unsigned int c ; unsigned char* cptr = (unsigned char*) while(1) { scanf("%d", printf("Integer value: %u\n",c); printf("%u.%u.%u.%u \n",*cptr, *(cptr+1), *(cptr+2), *(cptr+3) ); } } This code gives incorrect output for...

How to use NetCat for Windows to send a binary file to a TCP connection?

If I want to transfer a binary file "binary.bin" (located in the same directory as NetCat) to IP address 127.0.0.1 port 1200 using TCP, how do I specify this using NetCat for windows? ...

C#: get Client-IP after ProxyPass

My ASP.NET application checks the IP of the calling client. But I have to host it behind a Linux-Box where Apache redirects it to an internal Windows 2003 Server running IIS like: ProxyPass /srs http://192.168.21.15/srs/ where 192.168.21.15 is the internal IP of the Windows-server, and 192.168.21.1 the internal IP of the Linux box ...

Is it possible to have SSL certificate for IP address, not domain name?

I want my site to use URLs like http://2.2.2.2/... and https://2.2.2.2/... for static content to avoid unnecessary cookies in request AND avoid additional DNS request. Is there any way to obtain SSL cert for this purpose? ...

.Net IPAddress IPv4

Hi, I have the following code: Dim ipAdd As IPAddress = Dns.GetHostEntry(strHostname).AddressList(0) Dim strIP As String = ipAdd.ToString() When I convert to String instead of an IPv4 address like 192.168.1.0 or similar I get the IPv6 version: fd80::5dbe:5d89:e51b:d313 address. Is there a way I can return the IPv4 address from IPAdd...

Which database engines support IP addresses as a native type?

I'm trying to find databases with support for IP addresses as a native type (as opposed to storing as a string, or an unsigned integer, which at least one commenter has already pointed out won't work for IPv6). The primary reason I'm looking for this is ease of development. For example, sorting on a "native" IP address column would be co...

VPN Client Subnet Issues - Hopefully simple for someone who knows how!

Hi Everyone. I'm trying to set up VPN access with using SSTP in my home network. I have a virtual machine with two network adapters. The 'internal' adapter settings are: IP - 192.168.1.7 Sub - 255.255.255.0 DNS - 192.168.1.2 (local dns server) WINS - 192.168.1.2 (local wins server) The 'external' adapter settings are IP - 192.168.1.8...

When multiple computers have identical IP addresses, how can you connect to one of them programmatically?

Hi, This question is a bit hard to phrase and I'm not sure if I understand the underlying issue, but here goes: I have a java chat program. I run it using 2 jar files - a server and a client. You run the server in the background on a computer, and then when you run the client you just have to enter the ip address of the computer that's ...

How can I ask the user for some numbers in Java ME?

I am very new to Java Me (first time). I want my program to ask the user for an IP addres. So four numbers that are between 0 and 255. It doesn't need to be difficult, but as I said, I'm new to Java Me. ...

[iPhone] Objective-C : How to fetch the router address?

Hey there! I tried to fetch the router address this way. - (NSString *) routerIp { NSString *address = @"error"; struct ifaddrs *interfaces = NULL; struct ifaddrs *temp_addr = NULL; int success = 0; // retrieve the current interfaces - returns 0 on success success = getifaddrs(&interfaces); if (success == 0) { // ...