Specify which external ip address to use to access internet

Discussion in 'Server Operation' started by dustinhigh, Apr 14, 2010.

  1. dustinhigh

    dustinhigh New Member

    I have looked all over the place and can't find anything on this (at least that I am able to understand and modify to meet m
    y needs). I have an ubuntu vps running apache2. I have to external ip addresses I can use. I want to set up proxy servers so I can access the internet through my vps and specify which external ip address to use. I also don't want any Via headers or X_forwarded_for headers (I don't want sites to know I am accessing them via a proxy).

    What I have setup now:
    I enabled apache2 mod_proxy and have this in my /etc/apache2/sites-enabled/proxy.conf:
    <IfModule mod_proxy.c>
    #turning ProxyRequests on and allowing proxying from all may allow
    #spammers to use your proxy to send email.

    ProxyRequests On

    <Proxy *>
    AddDefaultCharset off
    Order deny,allow
    Deny from all
    Allow from
    #Allow from .example.com

    # Enable/disable t
    he handling of HTTP/1.1 "Via:" headers.
    # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
    # Set to one of: Off | On | Full | Block

    ProxyVia Block

    Now I am able to connect via my local machine using putty to ssh and create a tunnel through a port that I choose. I set up my browser (Firefox) to access through a socks proxy at localhost:port using the port that I set up the tunnel and am able to access the internet using my vps ip.

    The problem: I can't seem to set it up to use the second ip of my vps when I want to use that instead (sometimes simultaneously using one local cpu for the first addess and a second cpu for the second address). Even if I tunnel through putty to the second ip, the first ip address is always displayed as my external ip address when accessing the internet. I can't seem to find any information anywhere about this. If you could help or point me in the right direction, that would be great.

    Edit: I should also specify that the two local computers will be accessing the same types of data (mostly http) simultaneously.
    Last edited: Apr 14, 2010

Share This Page