I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.
if ufw is not installed by default be sure to install it first.
| <script type="text/javascript"> | |
| (function () { | |
| "use strict"; | |
| // once cached, the css file is stored on the client forever unless | |
| // the URL below is changed. Any change will invalidate the cache | |
| var css_href = './index_files/web-fonts.css'; | |
| // a simple event handler wrapper | |
| function on(el, ev, callback) { | |
| if (el.addEventListener) { | |
| el.addEventListener(ev, callback, false); |
This gist assumes:
| <?php // Don't use this line. | |
| /* | |
| * Add the script below to wherever you store custom code snippets | |
| * in your site, whether that's your child theme's functions.php, | |
| * a custom plugin file, or through a code snippet plugin. | |
| */ | |
| /** | |
| * This function will connect wp_mail to your authenticated |
| deb http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse | |
| deb-src http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse | |
| deb http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse | |
| deb-src http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse | |
| deb http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse | |
| deb-src http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse | |
| deb http://ports.ubuntu.com/ubuntu-ports focal-security main restricted universe multiverse |
mainly used in start-up script
When we play with iptables aka firewall we might end up in situation, where we execute rule, which has unforseen impact - lock yourself out. Recovering from this situation is necessity.
How to:
- Enable reboot via SMS.
- Test all commands in shell first before putting them into Start-up script. This way the command will be wiped out, when unit is rebooted.
| #!/usr/bin/env bash | |
| # | |
| # Certbot Nginx Reload | |
| # | |
| # Let's Encrypt Certbot post hook command for Nginx which checks the updated | |
| # configuration files and reloads the server if everything validates. | |
| # | |
| # Author : Justin Hartman <code@justinhartman.co> | |
| # Version : 1.0.1 | |
| # License : MIT <https://opensource.org/licenses/MIT> |
| # config to don't allow the browser to render the page inside an frame or iframe | |
| # and avoid clickjacking http://en.wikipedia.org/wiki/Clickjacking | |
| # if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri | |
| # https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options | |
| add_header X-Frame-Options SAMEORIGIN; | |
| # when serving user-supplied content, include a X-Content-Type-Options: nosniff header along with the Content-Type: header, | |
| # to disable content-type sniffing on some browsers. | |
| # https://www.owasp.org/index.php/List_of_useful_HTTP_headers | |
| # currently suppoorted in IE > 8 http://blogs.msdn.com/b/ie/archive/2008/09/02/ie8-security-part-vi-beta-2-update.aspx |