[Last Call] Learn how to a build a cloud-first strategyRegister Now


Masking server IP with fsockopen?

Posted on 2007-10-18
Medium Priority
Last Modified: 2012-05-11
here's my code so far

$proxy = ''; // proxy IP, change this according to your proxy setting in your IE or NS
$port = 80; // proxy port, change this according to your proxy setting in your IE or NS

$fp = fsockopen($proxy, $port);
fputs($fp, "GET $url HTTP/1.0\r\nHost: $proxy\r\nConnection: close\r\n\r\n");
  $line = fgets($fp, 4000);

The connection to the proxy server seems to work just fine, but still after loading the page it still shows the IP of my server.

Is there any way to hide my servers' IP behind the proxy I've chosen?
Question by:Chaoskeeper
  • 2
LVL 16

Expert Comment

ID: 20099862
Hello Chaoskeeper,

It seems that your proxy is a transparent proxy, showing who is doing what behind the proxy.
You need to configure your proxy to be a anonymous proxy, meaning that the proxy will not relay your ip, but show the proxy ip address.
If it is your corporate firewall, I reckon you will have trouble changing the settings because of the obvious consequence.....



Author Comment

ID: 20099949
the proxy is actually a random one somewhere on the internet
it seems that my host only accepts connections from the common ports (80,21, 110, etc) so I can't take any proxy that has a fancy port

but still if I take a proxy server stated as "high-anonymity" in this list http://www.proxylist.com.ru/proxyb-search.php?act=list&queryId=WW22T4aUh&page=11 it still shows my servers IP

tricky little bastard
LVL 16

Accepted Solution

alain34 earned 1500 total points
ID: 20099974
Than I don't believe that it is that high anonymity if your IP address is visisble.

The truly anonymous one that appears in these lists are often available for a couple of days until somebody decide to shut them down.

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses
Course of the Month18 days, 4 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question