Masking server IP with fsockopen?

Posted on 2007-10-18
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
    LVL 16

    Expert Comment

    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.....


    LVL 1

    Author Comment

    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 it still shows my servers IP

    tricky little bastard
    LVL 16

    Accepted Solution

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Suggested Solutions

    As this topic comes over and over again in different forms, I've finally decided to write a short (yea, right...) article / tutorial about pagination with PHP with MySQL database. There are dozens of these kind of tutorials, I know - I wanted to mak…
    Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now