csfpre rules is remove by csf or lfd
Posted: 02 Nov 2012, 15:50
Hi,
I use csfpre.sh to configure iptables rules to OPENVPN and work.
But at 2 weeks aprox, openvpn stop work.
I investigate and SNAT is disabled automaticly by CSF or LFD (dont known a correct reason)
This is line on csfpre.sh:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to 200.200.200.200
When restart csf, csfpre.sh is run and work perfecly:
[root@vpn ~]# iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 SNAT all -- * * 10.8.0.0/24 0.0.0.0/0 to:200.200.200.200
after hours (dont known exactly), iptables changed and not have more SNAT:
[root@vpn ~]# iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Probably a csf update cause this problem, because I already use this rule at 3 months, and only last 2 or 3 weeks start this problem.
Thanks
Leonardo
I use csfpre.sh to configure iptables rules to OPENVPN and work.
But at 2 weeks aprox, openvpn stop work.
I investigate and SNAT is disabled automaticly by CSF or LFD (dont known a correct reason)
This is line on csfpre.sh:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to 200.200.200.200
When restart csf, csfpre.sh is run and work perfecly:
[root@vpn ~]# iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 SNAT all -- * * 10.8.0.0/24 0.0.0.0/0 to:200.200.200.200
after hours (dont known exactly), iptables changed and not have more SNAT:
[root@vpn ~]# iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Probably a csf update cause this problem, because I already use this rule at 3 months, and only last 2 or 3 weeks start this problem.
Thanks
Leonardo