mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-25 02:12:58 +02:00
openvpnctl: Flush BLOCK and SNAT chain when needed.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user