Personal HTTP Proxy using tinyproxy with Oracle Cloud VPS

Oracle Cloud Free Tier give you 2 compute VPS to use. It is a very good option to setup your own HTTP proxy for home/personal usage.

1. Install tinyproxy and other useful packages.

sudo apt-get install tinyproxy nano rsyslog logrotate dnsutils

2. Edit /etc/tinyproxy/tinyproxy.conf with below setting. Restart the service afterward.

User tinyproxy
Group tinyproxy
Port 8888
Timeout 600
DefaultErrorFile "/usr/share/tinyproxy/default.html"
StatFile "/usr/share/tinyproxy/stats.html"
LogFile "/var/log/tinyproxy/tinyproxy.log"
LogLevel Info
PidFile "/run/tinyproxy/tinyproxy.pid"
MaxClients 100
MinSpareServers 5
MaxSpareServers 20
StartServers 10
MaxRequestPerChild 0
# Allow all to access
Allow 0.0.0.0/0
ViaProxyName "tinyproxy"
ConnectPort 443
ConnectPort 563

3. Allow incoming 8888 port access in iptables.

-A INPUT -p tcp -m state --state NEW -m tcp --dport 8888 -j ACCEPT 

4. To secure your personal HTTP proxy service, configure your iptables rules to only incoming access from your own public IP.

-A INPUT -p tcp -m state --state NEW -m tcp --dport 8888 -s xxx.xxx.xxx.xxx -j ACCEPT 

5. For those who only have dynamic public IP, follow this guide to dynamic update the iptables rules using cron and ddns service.

6. Remember to allow port 8888 (ingress rules) on the Oracle Cloud's VPS/Virtual Cloud Network (VCN).

7. Configure manual proxy in your browser like Firefox.

 

 

Comments