OpenVPN Server with UDP + TCP + Squid Proxy + ShadowSocksR

_.:=iTake=:._

Administrator
Staff member
Credits
3,329
#1
Configuring OpenVPN with UDP VPN + TCP VPN

First, get the script and make it executable :

Code:
curl -O https://raw.githubusercontent.com/Angristan/openvpn-install/master/openvpn-install.sh
chmod +x openvpn-install.sh
Then run it :

Code:
./openvpn-install.sh

Configuring Steps:

Add IPTables:

Code:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

iptables -t nat -A POSTROUTING -s 10.9.0.0/24 -o eth0 -j MASQUERADE

iptables -t nat -A POSTROUTING -s 10.10.0.0/24 -o eth0 -j MASQUERADE

iptables -A INPUT -i eth0 -p udp --dport port -j ACCEPT

iptables -A INPUT -i eth0 -p tcp --dport port -j ACCEPT

iptables -A INPUT -i eth0 -p tcp --dport port -j ACCEPT
Copy Service:

Code:
cp /lib/systemd/system/openvpn\@.service /etc/systemd/system/tcpvpn\@.service

cp /lib/systemd/system/openvpn\@.service /etc/systemd/system/udpvpn\@.service

cp /lib/systemd/system/openvpn\@.service /etc/systemd/system/squidvpn\@.service

Duplicate Files:

Code:
cd /etc/openvpn/

cp server.conf udpvpn.conf

cp server.conf tcpvpn.conf

cp server.conf squidvpn.conf

Edit Files:

nano udpvpn.conf

---> Change 10.8.0.0 to 10.9.0.0

nano tcpvpn.conf

---> Change 10.8.0.0 to 10.9.0.0

nano squidvpn.conf

---> Change 10.8.0.0 to 10.10.0.0

Restart Services:

Code:
service [email protected] restart

service [email protected] restart

service [email protected] restart
 
Last edited:

_.:=iTake=:._

Administrator
Staff member
Credits
3,329
#2
Configuring Squid Proxy Server

Code:
sudo apt-get update

sudo apt-get install squid

sudo apt-get install squid3

Change directory


Code:
cd /etc/squid

cd /etc/squid3

Open squid.conf

Code:
nano squid.conf
Search http_port 3128

Change the 3128 to any port eg. 5421

Uncomment:

Code:
http_access deny all
Add:

Code:
http_access allow all

acl Safe_ports port number(replace with port number)

acl SSL_ports port number(replace with port number)

These are the lines you add or change:


Code:
http_port 5421

http_access allow all

acl Safe_ports port number(replace with port number)

acl SSL_ports port number(replace with port number)
Restart Squid Server:

Code:
sudo service squid restart

sudo service squid3 restart
 
Last edited:

_.:=iTake=:._

Administrator
Staff member
Credits
3,329
#3
Configuring ShadowsocksR Super Fast Secure Proxy

Log in as the root user and run the following command:

Code:
wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocksR.sh
chmod +x shadowsocksR.sh
./shadowsocksR.sh 2>&1 | tee shadowsocksR.log
Or Try the four in One Script

Code:
wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-all.sh
chmod +x shadowsocks-all.sh
./shadowsocks-all.sh 2>&1 | tee shadowsocks-all.log

After the installation is complete, the script prompts as follows:

Code:
Congratulations, ShadowsocksR server install completed!
Your Server IP        :your_server_ip
Your Server Port      :your_server_port
Your Password         :your_password
Your Protocol         :your_protocol
Your obfs             :your_obfs
Your Encryption Method:your_encryption_method

Welcome to visit:https://shadowsocks.be/9.html
Enjoy it!
Uninstall method:
Log in as root and run the following command:

Code:
./shadowsocksR.sh uninstall
After the installation is complete, ShadowsocksR is started in the background and runs:

Code:
/etc/init.d/shadowsocks status
You can see if the ShadowsocksR process has started.
After the script is installed, ShadowsocksR has been automatically added to boot and self-start.

Use the command:
Code:
Start: /etc/init.d/shadowsocks start
Stop: /etc/init.d/shadowsocks stop
Restart: /etc/init.d/shadowsocks restart
Status: /etc/init.d/shadowsocks status

Configuration file path: /etc/shadowsocks.json
log file path: /var/log/shadowsocks.log
code installation directory: /usr/local/shadowsocks
Multi-user configuration example:

Code:
{
"server":"0.0.0.0",
"server_ipv6": "[::]",
"local_address":"127.0.0.1",
"local_port":1080,
"port_password":{
    "8989":"password1",
    "8990":"password2",
    "8991":"password3"
},
"timeout":300,
"method":"aes-256-cfb",
"protocol": "origin",
"protocol_param": "",
"obfs": "plain",
"obfs_param": "",
"redirect": "",
"dns_ipv6": false,
"fast_open": false,
"workers": 1
}
If you want to modify the configuration file, please refer to:

https://github.com/shadowsocksr-backup/shadowsocks-rss/wiki/Server-Setup
https://github.com/shadowsocksr-backup/shadowsocks-rss/blob/master /ssr.md
https://github.com/shadowsocksr-backup/shadowsocks-rss/wiki/config.json
 
Last edited:
Top