openvpnctl: Flush BLOCK and SNAT chain when needed.

This commit is contained in:
Michael Tremer
2013-06-12 12:50:33 +02:00
parent 05d4f131e9
commit 2181b55552

View File

@@ -295,6 +295,10 @@ void deleteAllChains(void) {
deleteChain(OVPNRED);
deleteChain(OVPNBLUE);
deleteChain(OVPNORANGE);
// Only flush chains that are created by the firewall
flushChain(OVPNBLOCK);
flushChainNAT(OVPNNAT);
}
void createChainReference(char *chain) {
@@ -458,6 +462,7 @@ void setFirewallRules(void) {
flushChain(OVPNRED);
flushChain(OVPNBLUE);
flushChain(OVPNORANGE);
flushChain(OVPNBLOCK);
flushChainNAT(OVPNNAT);
// set firewall rules