Skip to content

Instantly share code, notes, and snippets.

View daveloyall's full-sized avatar

David Loyall daveloyall

  • Omaha, NE
View GitHub Profile
@daveloyall
daveloyall / iptables.sh
Last active September 22, 2017 21:22 — forked from thomasfr/iptables.sh
dave's iptables.sh
#!/bin/bash
IPT="/sbin/iptables"
# Server IP
SERVER_IP="$(ip addr show venet0 | grep 'inet .*scope global' | cut -f2 | awk '{ print $2}')"
# Your DNS servers you use: cat /etc/resolv.conf
DNS_SERVER="8.8.4.4 8.8.8.8"
# Allow connections to this package servers