High level of protection
To encrypt data, robust AEAD algorithms are used
Secure connection
Ensuring the security of your internet connection
Servers in different countries
You can switch between all available servers of the service without any limitations

Telegram

Subscribe to our Telegram channel and get all important service news as quickly and conveniently as possible!

Read More...

Twitter

Fresh feed of news via Twitter!

Worldwide IT and security news via our Twitter by MultiVPN...

Read More...

Blog MultiVPN

Official MultiVPN Blog. Top news of MultiVPN service, updates, files and rest urgent important information!

Read More...

OpenVPN Traffic Leak Blocker on Linux


Open a terminal. First of all, you must obtain superuser rights:

Using Ubuntu Linux as an example:


  user@ubuntu:~$ sudo bash
  [sudo] password for user:
  root@ubuntu:/home/user# id
  uid=0(root) gid=0(root) groups=0(root)
  root@ubuntu:/home/user#

For example, Fedora Linux:


  [user@localhost ~]$ su
  Password:
  [root@localhost user]# id
  uid=0(root) gid=0(root) groups=0(root)
  [root@localhost user]#

Download scripts using your browser:
/files/vpnfirewall
/files/deactivate_vpn_firewall
and save them in the "Downloads" (wget, curl, etc. will not work, due to Anti-DDoS tools on the service website):


  root@ubuntu:/home/user# cd Downloads/
  root@ubuntu:/home/user/Downloads# ls -la
  total 20
  drwxr-xr-x 2 user user 4096 May 26 02:09 .
  drwxr-xr-x 17 user user 4096 May 26 02:08 ..
  -rw-rw-r-- 1 user user 210 May 26 02:09 deactivate_vpn_firewall
  -rw-rw-r-- 1 user user 6370 May 26 02:08 vpnfirewall
  root@ubuntu:/home/user/Downloads#

Change the owner of the scripts to "root", enable their execution and transfer to /usr/bin:


  root@ubuntu:/home/user/Downloads# chown root:root vpnfirewall
  root@ubuntu:/home/user/Downloads# chown root:root deactivate_vpn_firewall
  root@ubuntu:/home/user/Downloads# chmod 0755 vpnfirewall
  root@ubuntu:/home/user/Downloads# chmod 0755 deactivate_vpn_firewall
  root@ubuntu:/home/user/Downloads# mv vpnfirewall /usr/bin/
  root@ubuntu:/home/user/Downloads# mv deactivate_vpn_firewall /usr/bin/

Now, you can activate the traffic leak blocking script with the "vpnfirewall" command. Run the command with superuser privileges:


  root@ubuntu:/home/user/Downloads# vpnfirewall
  OK: Loading VPN firewall...
  OK: The firewall should not show any messages,
  OK: besides output beginning with prefix OK:...
  OK: VPN firewall loaded.
  root@ubuntu:/home/user/Downloads#

After applying the new iptables rules set by the script, connections will be allowed only to VPN servers of the MultiVPN service. All other connections will be blocked:


  root@ubuntu:/home/user/Downloads# ping 1.1.1.1
  PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
  From 10.0.2.15 icmp_seq=1 Packet filtered
  ping: sendmsg: Operation not permitted
  ^C
  --- 1.1.1.1 ping statistics ---
  1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
  root@ubuntu:/home/user/Downloads# wget https://1.1.1.1
  --2020-05-26 02:19:20-- https://1.1.1.1/
  Connecting to 1.1.1.1:443... failed: No route to host.
  root@ubuntu:/home/user/Downloads#

Now, you can connect to the VPN server. In the event of a disconnection, switching between servers, etc. the script will block traffic leaks.

If you need to allow Internet connections again without using a VPN, run the "deactivate_vpn_firewall" command with superuser privileges:


  root@ubuntu:/home/user/Downloads# deactivate_vpn_firewall
  + iptables -F
  + iptables -X
  + iptables -t nat -F
  + iptables -t nat -X
  + iptables -t mangle -F
  + iptables -t mangle -X
  + iptables -P INPUT ACCEPT
  + iptables -P OUTPUT ACCEPT
  + iptables -P FORWARD ACCEPT
  + exit 0
  root@ubuntu:/home/user/Downloads#

Deactivating traffic leakage blocking was successful. Internet access restored:


  root@ubuntu:/home/user/Downloads# ping 1.1.1.1
  PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
  64 bytes from 1.1.1.1: icmp_seq=1 ttl=63 time=61.3 ms
  ^C
  --- 1.1.1.1 ping statistics ---
  1 packets transmitted, 1 received, 0% packet loss, time 0ms
  rtt min/avg/max/mdev = 61.307/61.307/61.307/0.000 ms
  root@ubuntu:/home/user/Downloads#

Add the script to autorun if you want to block traffic without a VPN connection, immediately after loading the operating system.

For Ubuntu Linux, you need to run the following commands with superuser privileges:


  root@ubuntu:/home/user/Downloads# cd /etc/init.d/
  root@ubuntu:/etc/init.d# wget https://raw.githubusercontent.com/piratelinux/VPN-Firewall/master/etc/init.d/vpnfirewall
  --2020-05-26 02:25:07-- https://raw.githubusercontent.com/piratelinux/VPN-Firewall/master/etc/init.d/vpnfirewall
  Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.244.133
  Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.244.133|:443... connected.
  HTTP request sent, awaiting response... 200 OK
  Length: 2699 (2,6K) [text/plain]
  Saving to: ‘vpnfirewall’
  vpnfirewall 100%[=====================>] 2,64K --.-KB/s in 0,01s
  2020-05-26 02:25:09 (226 KB/s) - ‘vpnfirewall’ saved [2699/2699]
  root@ubuntu:/etc/init.d# chmod 0755 vpnfirewall
  root@ubuntu:/etc/init.d# update-rc.d vpnfirewall defaults
  root@ubuntu:/etc/init.d#

For Fedora Linux, add vpnfirewall to the crontab scheduler with the command:


  echo '@reboot root /usr/bin/vpnfirewall' >> /etc/crontab

Now, after loading the operating system, blocking traffic leaks will be applied automatically.

The proposed scripts have been successfully tested on operating systems: Debian 10, Ubuntu 20, and Fedora 32.

Based on materials from the GitHub project: https://github.com/piratelinux/VPN-Firewall


Linux instructions