Difference between revisions of "OpenVPN/Firewall"

From Secure Computing Wiki
Jump to: navigation, search
(iptables)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
----
 
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 
----
 
=[http://yxiwisewava.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]=
 
----
 
=[http://yxiwisewava.co.cc CLICK HERE]=
 
----
 
</div>
 
 
{{OpenVPN_Menu}}
 
{{OpenVPN_Menu}}
 
Follow these instructions to disable/clear your firewall rulesets for various firewalls.
 
Follow these instructions to disable/clear your firewall rulesets for various firewalls.
Line 12: Line 4:
 
== pf ==
 
== pf ==
 
Disable firewall
 
Disable firewall
&lt;pre>pfctl -d&lt;/pre>
+
<pre>pfctl -d</pre>
  
 
Enable firewall
 
Enable firewall
&lt;pre>pfctl -e&lt;/pre>
+
<pre>pfctl -e</pre>
  
 
== iptables ==
 
== 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
 
Save a backup of current firewall config
&lt;pre>iptables-save > ~/fw-backup.ipt&lt;/pre>
+
<pre>iptables-save > ~/fw-backup.ipt</pre>
  
 
Restore a firewall config
 
Restore a firewall config
&lt;pre>iptables-restore &lt; ~/fw-backup.ipt&lt;/pre>
+
<pre>iptables-restore < ~/fw-backup.ipt</pre>
  
 
Completely turn off firewalling
 
Completely turn off firewalling
&lt;pre>iptables -t nat -P PREROUTING ACCEPT
+
<pre>iptables -t nat -P PREROUTING ACCEPT
 
iptables -t nat -P POSTROUTING ACCEPT
 
iptables -t nat -P POSTROUTING ACCEPT
 
iptables -t nat -P OUTPUT ACCEPT
 
iptables -t nat -P OUTPUT ACCEPT
Line 41: Line 36:
 
iptables -t mangle -X
 
iptables -t mangle -X
 
iptables -t filter -F
 
iptables -t filter -F
iptables -t filter -X&lt;/pre>
+
iptables -t filter -X</pre>

Latest revision as of 07:28, 10 September 2013

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