Skip to content

Instantly share code, notes, and snippets.

View leonidlezner's full-sized avatar

Leonid Lezner leonidlezner

View GitHub Profile
@leonidlezner
leonidlezner / ufw_vpn_killswitch_tutorial.md
Created September 14, 2019 08:36 — forked from Necklaces/ufw_vpn_killswitch_tutorial.md
GNU/Linux UFW VPN kill switch tutorial

GNU/Linux UFW VPN kill switch tutorial

This is a quick guide for setting up a kill switch using UFW (Uncomplicated FireWall). It is assumed you are using OpenVPN and optionally Network-Manager with network-manager-openvpn.

1. (Optional) IP Addresses

Before we can start we're going to need the IP address (or the IP addresses) of your VPN so that we can whitelist those later on, write them down. They are obviously going to be different for every VPN and VPNs with multiple servers, so I'll leave this up to you.

2. Install & Enable UFW

On some systems UFW is installed and enabled by default (Ubuntu, for example). Installation procedure is going to be different for every distribution of GNU/Linux, but once you've got it installed enabling it is easy (assuming you have sudo):

@leonidlezner
leonidlezner / laravelcookbook.md
Last active May 23, 2018 22:03
Laravel Cookbook

Cookbook

Adding a virtual host for local development

Add to the httpd-vhosts.conf file:

<VirtualHost *:80>
    DocumentRoot "/Users/leonidlezner/Documents/Projects/laravelPlayground/leosnotes/public"
    ServerName leosnotes.local
@leonidlezner
leonidlezner / generate.php
Created April 25, 2016 15:56
Generate multiple pages in ProcessWire
<?php
include('index.php');
$page = $pages->get('/blog');
for($i = 0; $i < 20; $i++) {
$post = new Page();
$post->template = 'blogpost';
$post->parent = $page;