Skip to content

Instantly share code, notes, and snippets.

@codeb2cc
Forked from anonymous/iptables
Created January 3, 2013 15:44
Show Gist options
  • Save codeb2cc/4444395 to your computer and use it in GitHub Desktop.
Save codeb2cc/4444395 to your computer and use it in GitHub Desktop.
Linode PPTP VPN iptables configuration
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*nat
:PREROUTING ACCEPT [10:532]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
# PPTP
-A POSTROUTING -s 10.18.1.0/24 -o eth0 -j MASQUERADE
COMMIT
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
# SSH
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8086 -j ACCEPT
# HTTP
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
# PPTP
-A FORWARD -i ppp+ -o eth0 -j ACCEPT
-A FORWARD -i eth0 -o ppp+ -j ACCEPT
-A INPUT -i eth0 -p tcp --dport 1723 -j ACCEPT
-A INPUT -i eth0 -p gre -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment