1
голосов
3ответов
20961 просмотров

How to Send Packets Between Two IP Hosts on Different Subnets?

Host 1: 10.10.0.1 Host 2: 10.10.1.2 Mask is both: 255.255.255.0 How to send a packet from Host 1 to Host 2?

2
голосов
3ответов
3638 просмотров

Get IP of my machine C# with virtual machine installed

I want to get the current IP address of the computer that has say 3 virtual machines (VM Ware) installed. I want to get LAN address of that computer. current code that i have returns me an array but how to identify current computer lan address ? public static string getThisCompIPAddress() {...

0
голосов
2ответов
1018 просмотров

how to code an ip tracer program in c?

i would like to code an ip tracer program in c , but i am not able to get a head start in it . Any e book , links or sample code would be of much needed help !!

0
голосов
2ответов
11466 просмотров

How to scan an IP Range C#

How to scan a specific range of IP and also increment it to user defined range.. in like most of the port scanners. but how to increase host bits.. it increases network bits.. private static void sendAsyncPingPacket(string hostToPing) { try { int timeout = 5000; ...

0
голосов
2ответов
361 просмотров

What does the following mean in PHP?

what does the colon mean in php in the following example. ::1 if($host == "" || $ip == "::1")

0
голосов
1ответов
121 просмотров

How to prevent access to a single file based on IP using .htaccess?

All the resources I've read explain how to prevent access to an entire directory based on IP but don't explain how to do this for a single file. This is what is used to protect a directory: <Limit GET POST PUT> order deny,allow deny from all allow from 123.456.78.910 </Limit> H...

1
голосов
1ответов
1345 просмотров

Retrieve Proxy IP address C#

I need to know what this proxy and in the past I used an IP webservice to get the IP. Is there was some way in C# to get the actually proxy IP address. If I could just ping somewhere and get the IP that way that would be ideal.

0
голосов
1ответов
715 просмотров

Restricting access to a website by IP address range / domain

I would like advice on the best way to restrict access to a weba pplication (using .net 2.0 and II6) based on the clients IP address. The two ways I am considering: 1) Through the server side code - check the client I.P against a list of IP addresses within the web.config. 2) Through IIS by cre...

1
голосов
2ответов
818 просмотров

How can I determine that user IP address is in accessible range or not?

I am grabbing user IP address, and then I want to determine whether that IP address is in accessible range or not. What I am doing is, in my PHP script i am using 'ip2long' function and compare it with allowed range of ip address. I know this is not a clean way to do that...does anyone have bet...

0
голосов
1ответов
255 просмотров

Python: Grab the A record of any URI?

I basically want to implement something where you can type in any URI ( I probably will only deal with http ) and I want to return the A record of the domain in the URI, I want the server's IP address. I know there's the ping command which most people use to look an ip address up, but I also kn...

36
голосов
8ответов
117047 просмотров

How to calculate the IP range when the IP address and the netmask is given?

When a IP-Range is written as aaa.bbb.ccc.ddd/netmask (CIDR Notation) I need to calculate the first and the last included ip address in this range with C#. Example: Input: 192.168.0.1/25 Result: 192.168.0.1 - 192.168.0.126

6
голосов
9ответов
13723 просмотров

How to redirect an entire range/block of IP addresses with PHP?

I'm using the following snippet to redirect an array of IP addresses. I was wondering how I would go about adding an entire range/block of IP addresses to my dissallowed array... <?php // Let's redirect certain IP addresses to a "Page Not Found" $disallowed = array("76.105.99.106"); $ip = $_S...

4
голосов
5ответов
6226 просмотров

Rails saving IP address with every create/update request

I'd like to do the following: define a before_filter in application.rb that extracts the user's IP address and stores it anywhere, preferably in the session. define two before filters in all my models as before_create and before_update that add the current user's IP to the object to be stored...

2
голосов
1ответов
3716 просмотров

Problem with JSP getRemoteAddress

I would like to find out how to get IP address of the client, that is visiting my web pages. Content of JSP page: <% out.print( request.getRemoteAddr() + "<br>"); out.print( request.getRemoteHost() ); %> Output: 0:0:0:0:0:0:0:1 0:0:0:0:0:0:0:1

0
голосов
1ответов
2553 просмотров

mod_Rewrite: Allow only one IP and redirect the rest to a certain error url?

I got a code that will match a certain block of IP and redirect them to another page. RewriteCond %{REMOTE_ADDR} ^192\.168\.10\..* RewriteRule ^/support http://www.yahoo.com/gone [R,NE,NC] However, how would I reverse this? to only allow one IP and redirect the rest to a certain url?

2
голосов
1ответов
4509 просмотров

mod_Rewrite: Filter specific pages by IP and redirect them

I am researching a way to work filtering specific pages by IP and redirect them on a different page. The code below, did not work properly. RewriteCond %{REMOTE_ADDR} ^/192.168.10.* RewriteCond %{REQUEST_URI} ^/support RewriteRule ^/.* http://www.yahoo.com/gone [R,NE] Once the link http://exa...

0
голосов
3ответов
9263 просмотров

PHP getenv('REMOTE_ADDR') serious side effects?

I am trying to grab a users' IP address to show them content relevant to their geography. I used the php code $ip = getenv('REMOTE_ADDR'); to grab their IP address. This works fine on my computer but my co-developer tried it and found that he was unable to connect to our site at all and got a "Ho...

3
голосов
3ответов
4350 просмотров

C# convert hex into ip

i have hex values in the format of 4a0e94ca etc, and i need to convert them into IP's, how can i do this in C# ?

0
голосов
3ответов
57 просмотров

Emailing about IP changes

You can choose any language. I am interested to know the simplest solution. How can you get your comp's IP and email it?

0
голосов
1ответов
409 просмотров

ip_len set to very large values

I have a program that sets the network interface to promiscuous mode, creates a socket that receives all incoming packets, and then enters a loop to read a packet into a buffer, set a pointer to the location of the IP header, and then print the value of its ip_len field. The problem is that the p...

1
голосов
2ответов
2484 просмотров

Does a UDP service have to respond from the connected IP address?

Pyzor uses UDP/IP as the communication protocol. We recently switched the public server to a new machine, and started getting reports of many timeouts. I discovered that I could fix the problem if I changed the IP that was queried from eth0:1 to eth0. I can reproduce this problem with a simple...

5
голосов
2ответов
6979 просмотров

How do I determine the IP address of a web client (for a JSP)?

I would like to find out the ip address of the client that is visiting my web pages. Content of JSP page: <% out.print( request.getRemoteAddr() + "<br>"); out.print( request.getRemoteHost() ); %> Output: 0:0:0:0:0:0:0:1 0:0:0:0:0:0:0:1

1
голосов
3ответов
718 просмотров

ip address in java

I've been asked to activate a certain piece of code if i was in my college. So I need to find the iP of where i am to match to my colleges iP. Was wonderng how to do this in java? I have already tried a loop back interface.

4
голосов
7ответов
10812 просмотров

Get "real" IP address with VB.NET?

I'm looking for a function that will give me my real IP, not my local IP. the function i currently have, returns the ip in network and sharing center which is 192.168.2.100 But if I go to whatismyip, then it gives my real IP. How could I get this using VB.NET? thanks

59
голосов
2ответов
49152 просмотров

How to get client IP and Server IP using Rails

Can anyone please help how to get client IP and also server IP using Ruby on Rails?

0
голосов
1ответов
1040 просмотров

bind ip to subdomain

I have a linux client that reports his ip adress to a server who writes the ip down in a mysql table. Now my question is how to bind this ip adresse to a subdomain in the moment it is submitted by the client? i heard about the Linux DNS Bind but the addresses their are declared static in a file c...

2
голосов
3ответов
2040 просмотров

My IP is showing up wrong in PHP home server

Ok simple enough <?PHP echo $_SERVER[REMOTE_ADDR]; ?> Ok maybe not, I my IP is currently 72.184.212.85 however the code above which I am using on an IP blocking system for a script shows my IP as my home server IP of 127.0.0.1 So when I go to my script my IP is shown as 127.0.0.1 but wh...

0
голосов
3ответов
281 просмотров

How I Can Print The IP Of The Host

I'm learning C++ and i want to know how i can print the IP adress of the host machine, but remember that my program is a command line aplication(cmd), but i don't want the code, but some links here i can learn this, not copy and paste. Thanks!

29
голосов
5ответов
43301 просмотров

How do I access ARP-protocol information through .NET?

I am trying to figure out what devices are online and offline in our LAN. I've seen many programs doing a kind of graphical network overview, presenting LAN IP and MAC addresses. I would like to know if and how those (ARP?) information can be pulled from C#/.NET ? Any sample code snippets/links ...

2
голосов
2ответов
5660 просмотров

Objective-C - определение IP-адреса iPod touch программным способом

Я программирую на Objective-C для нескольких устройств iPod, и мне что-то было интересно. Я разрабатываю приложение, использующее модель сервер-клиент, и я использую протокол UDP с сокетами C. Есть ли класс, который позволяет мне определять IP-адрес устройства iPod? После поиска в других форумах...