Skip to content

Instantly share code, notes, and snippets.

Ahmad Mayahi ahmadmayahi

Block or report user

Report or block ahmadmayahi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ahmadmayahi
ahmadmayahi / docker-ee.sh
Created Mar 21, 2019
Installing Docker EE on Ubuntu dist.
View docker-ee.sh
DOCKER_EE_URL="Put your Docker EE url here"
DOCKER_EE_VERSION=18.09
sudo apt-get remove docker docker-engine docker-ce docker.io
sudo apt-get update -y
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL "${DOCKER_EE_URL}/ubuntu/gpg" | sudo apt-key add -
@ahmadmayahi
ahmadmayahi / iptables.sh
Last active Jun 23, 2017
iptables best practice for ubuntu 14+ - only 22, 80 and 443 ports
View iptables.sh
#This iptables snippet enables port 22, 80 and 443 only.
#WARNING: YOU HAVE TO EXECUTE THE 1ST COMMAND TO AVOID SELF BLOCKING, IF YOU DON'T TYPE THIS COMMAND THEN YOI'LL BE BLOCKED FROM ACCESSING YOUR SERVER.
#Accept active connecion (void self blocking)
iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
#Accept loopback connections
iptables -A INPUT -i lo -j ACCEPT
#Allow port 22 (ssh)
You can’t perform that action at this time.