Skip to content

Instantly share code, notes, and snippets.

@scorredoira
scorredoira / iptables.sh
Last active December 6, 2020 13:42
iptables rules
# flush iptable rules
iptables -F
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
# Allowing DNS lookups (tcp, udp port 53)
iptables -A OUTPUT -p tcp --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT
@nderjung
nderjung / list-grub-entries.sh
Created April 26, 2019 15:28
List grub entries
awk -F\' '$1=="menuentry " || $1=="submenu " {print i++ " : " $2}; /\tmenuentry / {print "\t" i-1">"j++ " : " $2};' /boot/grub/grub.cfg
@syci
syci / check_bl.sh
Created February 19, 2018 21:25
Check Server BlackList SMTP
#!/bin/sh
#
# title : blcheck
# description : Test any domain against more then 200 black lists.
# author : Intellex
# contributors : Darko Poljak
# date : 20160117
# version : 0.5.0
# usage : blcheck [options] <domain_or_ip>
#===============================================================================
@andrefy
andrefy / wordpress_nginx.conf
Created September 21, 2016 17:11
Wordpress Nginx
# WordPress single site rules.
# Designed to be included in any server {} block.
# This order might seem weird - this is attempted to match last if rules below fail.
# http://wiki.nginx.org/HttpCoreModule
location / {
try_files $uri $uri/ /index.php?$args;
}
# Add trailing slash to */wp-admin requests.
@solusipse
solusipse / 01_postfix_installer.md
Last active October 25, 2023 20:34
Postfix + Dovecot + Postgresql + Postfixadmin + Roundcube

Postfix Installer

Following script may be used for configuring complete and secure email server on fresh install of Debian 7. It will probably work on other distributions using apt-get. After minor changes you'll be able to use it on other Linux distros.

Usage

  1. Run postfix.sh script.
  2. Configure postgres to allow connections.
  3. Configure postfix admin. Remember to set these:
[MASTER]
# Specify a configuration file.
#rcfile=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Profiled execution.