DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Setup a Simple HTTP Proxy Server


The host 10.21.3.69 has no H3C client, so it can't access the internet. With Tinyproxy, we can setuup a proxy server on 10.21.3.31 to enable 69 access the internet.

Server Setup

  1. Install tinyproxy with apt-get install tinyproxy. On CentOS 7: sudo yum install epel-release; sudo yum install tinyproxy;

  2. Configure the proxy server by edit the configuration file with sudo vi /etc/tinyproxy/tinyproxy.conf:

    i. modify listening port to 8848;

    i. Comment out "Listen 127.0.0.1", or only client on localhost can use this proxy;

    i. Allow incoming clients: Allow 10.21.3.69 or Allow 192.168.0.0/16;

  3. Apply the changes: sudo service tinyproxy restart (or sudo systemctl restart tinyproxy);

Monitor the log with: sudo tail -f /var/log/tinyproxy/tinyproxy.log.

After job is done, run sudo service tinyproxy stop to stop the server.

Client

Used with browser: https_proxy=http://10.1.2.179:8848 http_proxy=http://10.144.251.179:8848 chromium-browser

Used in console:

sudo su -
http_proxy=http://10.1.2.179:8848 apt upgrade -y

For dropbox client: in [Preferences > Proxies]:

  • Proxy type: HTTP

  • Server: 10.1.2.179

  • Port: 8848



Published

Oct 30, 2013

Last Updated

Sep 27, 2019

Category

Tech

Tags

  • http 4
  • linux 158
  • proxy 4

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor