- Create an EC2 instance with Ubuntu 18.04 (I used t3.nano), and ssh into it
sudo apt-get update
sudo apt-get upgrade
- Install PiVPN with
curl -L https://install.pivpn.io | bash
- Follow the on screen instructions. Mostly use defaults but the protocol must be TCP, and I chose
1443
as my port - Install obfsproxy with
pip install obfsproxy
- Create a service file
/etc/systemd/system/obfsproxy.service
with contents
[Unit]
Description=Obfsproxy server
After=network.target
After=syslog.target
[Service]
ExecStart=/usr/bin/obfsproxy --log-min-severity=info obfs3 --dest=127.0.0.1:1443 server 0.0.0.0:2443
Restart=always
[Install]
WantedBy=multi-user.target
sudo systemctl enable obfsproxy
andsudo systemctl start obfsproxy
- Check that 1443 and 2443 are listening with
netstat -plnt
- On the EC2 security group add a rule to allow all TCP traffic on port 2443
- Create a user and private key for the VPN with
pivpn add
then enter the desired username and password - SCP the
.opvn
file off and get it onto your phone somehow - I used this OpenVPN Client and paid the few pounds for it, because it supports
obfs3
obfuscation. - Import the
.opvn
file into the app, and change the setting under remote servers >> edit remote server >> use proxy. Change the value toobfsproxy (obfs3)
- It should connect!