eBay Suspension & PayPal Limited Forums - View Single Post - VPN L2TP/IPsec VPN Kill Switch for Linux using UFW Firewall
eBay Suspension & PayPal Limited Forums  
Join Today
Register Subscribe
     

Registration is fast, simple and absolutely free so please, join our community today!


Go Back   Home

View Single Post
  #1  
Old 07-02-2017
nate's Avatar
nate nate is offline
Senior Member
 
Join Date: Jul 2016
Posts: 873
Thanks: 134
Thanked 320 Times in 210 Posts
Activity: 20%
Longevity: 22%
iTrader: (0)
Default VPN L2TP/IPsec VPN Kill Switch for Linux using UFW Firewall

From what I can tell so far this application works 100% con is having to disable/enable firewall every time VPN drops. If someone with 1st hand experience with Linux UFW firewall can tell me if I'm missing any thing I would appreciate it.

L2TP/IPsec VPN Kill Switch for Linux Ubuntu with UFW firewall.

1. Need IP of VPN Server = 100.000.00.000
2. Need to find port of VPN Server = TCP 443 (port @ top of list for TCP protocol)
3. Connect to VPN
4. Find what interface VPN uses ( tun0 or ppp0 ) by running cmd:

ifconfig

5. Find IP address of local network (Should look like 100.0.0.1/8) by running cmd :

ip addr show

6. Set up UFW firewall

sudo apt-get install ufw

sudo ufw enable

sudo ufw default deny outgoing

sudo ufw default deny incoming


You can test connection is blocked by pinging google server. Run cmd:

ping 8.8.8.8

Ctrl+c to kill cmd

sudo ufw allow out to 100.0.0.1/8

sudo ufw allow in to 100.0.0.1/8

sudo ufw allow out to 100.000.00.000 port 443 tcp

sudo ufw allow out on ppp0


To check the status of the firewall ( will not show default policies ) run cmd:

sudo ufw status numbered


7. Block all ipv6 by by deleting the rule number for ipv6 ( #5 )

sudo ufw delete 5

To check rule is deleted run cmd:

sudo ufw status numbered


When you lose VPN connection you must run cmd: “sudo ufw disable” to connect back to VPN:

sudo ufw disable

Once connected back to the VPN run cmd: “sudo ufw enable" to turn firewall killswitch back on.

sudo ufw enable


These cmds have been modified to work with SoftEther L2TP/IPsec form original source:
Reply With Quote
The complete step-by-step guide to get back to selling today!

 

Aspkin Group

All times are GMT -5. The time now is 02:37 PM.


Stop the guessing games and learn how you can quickly and easily get back on eBay today!
Read the best selling step-by-step eBay Suspension guide eBay Stealth!
Amazon Suspension? Read Amazon Ghost to get back on Amazon!
vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Ad Management by RedTyger