OpenVPN/Firewall

From Secure Computing Wiki
Revision as of 07:28, 10 September 2013 by Ecrist (Talk | contribs) (iptables)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
OpenVPN Topics

GENERAL: RoutingRIP RoutingBridgingFAQFirewallVPN ChainingHigh-AvailabilityTroubleshootingDonationsIRC meetingsDeveloper DocsTester Docs
OS RELATED: FreeBSD Routed FreeBSD Bridged

Follow these instructions to disable/clear your firewall rulesets for various firewalls.

pf

Disable firewall

pfctl -d

Enable firewall

pfctl -e

iptables

This will get you started. For more in-depth testing, see https://github.com/QueuingKoala/netfilter-samples/tree/master/reset-rules


Save a backup of current firewall config

iptables-save > ~/fw-backup.ipt

Restore a firewall config

iptables-restore < ~/fw-backup.ipt

Completely turn off firewalling

iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT
iptables -t mangle -P INPUT ACCEPT
iptables -t mangle -P OUTPUT ACCEPT
iptables -t mangle -P FORWARD ACCEPT
iptables -t mangle -P PREROUTING ACCEPT
iptables -t mangle -P POSTROUTING ACCEPT
iptables -t filter -P INPUT ACCEPT
iptables -t filter -P OUTPUT ACCEPT
iptables -t filter -P FORWARD ACCEPT
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -t filter -F
iptables -t filter -X