Horje
How to Identify a HTTP Request is Sent by a Local Network Computer or by an Internet Client?

Answer: If it falls within private IP ranges e.g., 10.x.x.x, 172.16.x.x to 172.31.x.x, 192.168.x.x, it’s from a local network, otherwise, it’s from an internet client.

Capture the Client’s IP Address

When your server receives an HTTP request, it typically includes the client’s IP address in the request headers or the server’s access logs.

Analyze the IP Address

Check if the IP address falls within the private IP address ranges:

  • 10.0.0.0 to 10.255.255.255
  • 172.16.0.0 to 172.31.255.255
  • 192.168.0.0 to 192.168.255.255

These ranges are reserved for private networks and are not routable on the internet.

Determine the Source

If the IP address is within these ranges, the request is coming from a local network computer. If the IP address does not fall within these ranges, it is from an internet client.

Conclusion

Identify local versus external clients by comparing incoming IP addresses with private IP ranges to secure and analyze network traffic.




Reffered: https://www.geeksforgeeks.org


Computer Networks

Related
How to Set Up a VPN On Smartphone or Other Devices? How to Set Up a VPN On Smartphone or Other Devices?
How to Use URLs? How to Use URLs?
How to Create a URL? How to Create a URL?
Which Ports on Firewall Should be Allowed for IPSEC Site to Site VPN? Which Ports on Firewall Should be Allowed for IPSEC Site to Site VPN?
How to Check the Status of the Tunnel’s Phase 1 and 2? How to Check the Status of the Tunnel’s Phase 1 and 2?

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
12