How to Setup a Private Proxy Server on EC2 in Under 10 Minutes
How to Setup a Private Proxy Server on EC2 in Under 10 Minutes
I’ve been slacking a bit with regular blog posts, so I thought I would catch up again with something simple yet useful.
This post will show you how to setup a simple private proxy server on Amazon Elastic Compute Cloud (EC2) and how to tunnel into it via SSH from your PC. Although your anonymity is probably not 100% guaranteed, you will be able to hide your identity from most sites and bypass most country restrictions.
Let’s start with AWS.
Create an Amazon Web Services (AWS) Account
First thing you will need is an AWS account. Go to the AWS Portal and sign up.
You will need a credit card to complete this process.
Why AWS? It is my preference, they commit to 99.95% uptime and they offer 750 hours of Amazon EC2 Micro Instance usage as part of their free usage tier.
Although this post primarily uses AWS, these steps can easily be replicated on any VPS hosting service like Linode.
Creating an EC2 Instance
Once you are verified and logged in, proceed to the EC2 service in the AWS Management Console and from the EC2 Dashboard click the Launch Instance button. Follow the steps and launch the instance.

If you did not create or use an existing Security Group, the one that gets created with the instance should be more than sufficient. The most important thing is to ensure that incoming connections are allowed over port 22.
Once your instance has been started and is up and running, take note of the Public DNS, as you will need it to connect via SSH.

NB. Unless you use an Elastic IP, the Public DNS will change every time you restart the instance.
Installing Tinyproxy
Tinyproxy is a small and fast HTTP/HTTPS proxy server daemon.
Connect to your instance using the key pair you downloaded:
1 |
|
Install Tinyproxy
1 |
|
By default Tinyproxy listens on port 8888 and only accepts local connections. This is not a problem since we will be tunneling in via SSH.
Tunneling

Open your terminal and start digging.
1 |
|
-L port:host:host-portSpecifies that the givenporton the local (client) host is to be forwarded to the givenhostandhost-porton the remote box.-NDo not execute any remote commands.
The above command can be added to either your .bashrc or .zshrc as an alias.
1 |
|
I won’t be covering Windoze in this post, but here is an article on how to setup tunneling using PuTTY.
Configuring Your Network
All major operating systems will allow you to edit proxy settings under the network settings or some similar place. In OS X, edit your network connection’s Proxy settings as follows:

Finally, to confirm everything is working visit smart-ip.net and you should see something like this:

Set up a cron task to restart Tinyproxy periodically to save memory
This isn't absolutely necessary to get this running, but if you're going to leave Tinyproxy running all the time and not restart your machine, then it will eventually eat all your memory and lock up your server. Open up root's crontab:
sudo crontab -e
And add the following lines
0 22 * * * root /etc/init.d/Tinyproxy restart
That's a tab after the 22, tab after the last *, and tab after root. Also add a final return at the end so you have one extra blank line in the file.
How to Setup a Private Proxy Server on EC2 in Under 10 Minutes的更多相关文章
- [Node] Setup an Nginx Proxy for a Node.js App
Learn how to setup an Nginx proxy server that sits in front of a Node.js app. You can use a proxy to ...
- Setup a private http/nginx based GIT server
原文:http://aaba.me/blog/2014/03/setup-a-private-http-nginx-based-git-server.html https://doomzhou.git ...
- 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 setuu ...
- Proxy Server代理服务器(轉載)
宽带IP城域网开通以来,单位连上了宽带网,10M的带宽让我们感受到了宽带的魅力.电信只提供7个IP地址,对任何一个单位来说都太少了,常用的解决办法是使用代理服务器.微软的MS Proxy Server ...
- Proxy Server源码及分析(TCP Proxy源码 Socket实现端口映射)
版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/u014530704/article/de ...
- How to setup vsftpd FTP file Server on Redhat 7 Linux
Forward from: https://linuxconfig.org/how-to-setup-vsftpd-ftp-file-server-on-redhat-7-linux How to s ...
- FTP Proxy Server
本文将在Linux环境下实现一个简单的FTP代理服务器,主要内容涉及FTP主动/被动模式和简单的Socket编程. 1. 主动模式和被动模式 FTP有两种模式,即主动模式(Active Mode)和被 ...
- 502 Proxy Error The proxy server received an invalid response from an upstream server
Proxy Error The proxy server received an invalid response from an upstream server. The proxy server ...
- proxy server 代理服务器
有时候,我觉得自己需要去搞明白.搞清楚一个概念,帮我打通一下自己的知识体系,或者说,尝试联络起来. 1. 简介 突破自身IP限制,访问国外站点. 访问单位或者团体内部资源. 突破中国电信的IP封锁. ...
随机推荐
- MongoDB整理笔记の性能监控
方法一:Mongostat 此工具可以快速查看某组运行中的mongodb实例的统计信息,用法如下: [root@localhost bin]# ./mongostat insert query upd ...
- .net core webapi 文件上传在 Swagger 文档中的有好提示处理
前提: 需要nuget Swashbuckle.AspNetCore 我暂时用的是 4.01 最新版本: 描述:解决 .net core webapi 上传文件使用的是 IFormFile,在S ...
- MongoDB单表导出与导入
mongoexport -h -u dbAdmin -p L-$LpGQ=FJvSf*****([l --authenticationDatabase=project_core_db -d proje ...
- 修改vscode caipeiyu.writeCnblog ,简化博客发布
修改vscode caipeiyu.writeCnblog ,简化博客发布 1. 安装caipeiyu.writeCnblog vscode的博客园文章发布插件WriteCnblog : https: ...
- java 文件硬盘存取 练习
读写文件操作 对字符流文件读写 1 写文件 FileOutputStream 节点类 负责写字节 OutputStreamWriter 转化类 负责字节到字符转换 BufferedWriter 装饰 ...
- 【bzoj2813】 奇妙的Fibonacci数列 线性筛
Description Fibonacci数列是这样一个数列: F1 = 1, F2 = 1, F3 = 2 . . . Fi = Fi-1 + Fi-2 (当 i >= 3) pty忽然对这个 ...
- 八大排序算法的python实现(一)直接插入排序
刚参考网上的以及书上的资料把这八大算法又复习了一遍,感悟就是:有些算法原理真的很简单,一看就懂,但实现起来总是有这样那样的问题. 闲言少叙,先贴代码,之后再以自己的理解,以及自己在理解与实现的过程中遇 ...
- Python3之Memcache使用
简介 Memcached是一个高性能的分布式内存对象缓存系统,用于动态WEB应用以减轻数据库负载.它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提高动态,数据库网站的速度.Memcached ...
- docker 自定义镜像
step1:自定义镜像 原镜像 registry.aspider.avlyun.org/library/php-apache docker run -d --name xz_apache regist ...
- 5.js与jQuery入口函数执行时机
js与jQuery入口函数执行时机区别: JS入口函数是在所有资源加载完成后,才执行.(包括:页面.外部js文件.外部css文件.图片) jQuery入口函数,是在文档加载完成后就执行.文档加载完成指 ...