Results 1 to 1 of 1

Thread: Linux VPN safety.

  1. #1
    Senior Member
    mickstv's Avatar
    Join Date
    Jan 2010
    Age
    51
    Posts
    4,173
    Thanks
    2,225
    Thanked 2,404 Times in 1,392 Posts
    Rep Power
    681
    Reputation
    18426

    Default Linux VPN safety.

    Thought I would post, how I setup UFW with VPN. All ports should be blocked except for the ones listed in the openvpn text file shown below. So now if the VPN service fails your real IP shouldn't be detected.

    This works on LinuxMint 17.3 but should also work on 18.




    1. terminal then sudo su
    2. nano /etc/services
    3. crtl+w then search for openvpn, once found # the start of both entries then crtl+o enter crtl+x.
    4. Create a new document (text file) on desktop and name it openvpn. Paste the text below and save. Change the ports to the ones your VPN provider uses.

    [openvpn]
    title=openvpn
    description=openvpn
    ports=53,443,1912/udp


    5. Open as Administrator /etc/ufw/application.d and place the openvpn file inside. Then check the permissions to make sure the owner is root.
    6. Setup UFW
    7. terminal then sudo su

    ufw disable
    ufw app update --add-new openvpn
    ufw app update openvpn
    ufw default deny incoming
    ufw default deny outgoing
    ufw allow in openvpn
    ufw allow out openvpn
    ufw allow out on tun0 from any to any
    ufw allow in on tun0 from any to any
    ufw enable


    8. Now all access should be blocked except for when openvpn is running.

    9. Restart the computer then in terminal as root, type ufw status if you see inactive the startup sequence might be controlled by systemd. If so just enter sudo systemctl enable ufw then do another restart and check ufw status from terminal. UFW status must be active.
    Last edited by mickstv; 21-06-17 at 11:54 AM.

  2. The Following 2 Users Say Thank You to mickstv For This Useful Post:

    Skepticist (22-06-17),tristen (21-06-17)



Look Here ->

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •