Author Topic: CSF restart from CWP crash iptables...  (Read 12678 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
CSF restart from CWP crash iptables...
« on: April 08, 2015, 09:33:12 AM »
I've added few iptables rules with
Code: [Select]
iptables -A etc

now when from the CSF Firewall page I click on Firewall Restart button... the web page crash, I mean the webpanel gets unresponsive for few minutes (tested with multiples browsers) and if I issue the command
Code: [Select]
service iptables status I see it running but without the custom rules settled before

then if I give the command
Code: [Select]
service iptables restart I got back the custom rules and the page "List iptables rules" on CWP working again

is that normail or a bug?

CWP version 0.9.8.4

Re: CSF restart from CWP crash iptables...
« Reply #1 on: April 08, 2015, 11:00:23 AM »
manually added something to iptables will flush that rule on restart of csf.

Offline
*
Re: CSF restart from CWP crash iptables...
« Reply #2 on: April 08, 2015, 12:17:20 PM »
manually added something to iptables will flush that rule on restart of csf.
doh! so I have to learn CSF..

I guess I'll put those rules on "Firewall post configuration" because I little big complex,
example:
Chain POSTROUTING 1    MASQUERADE  all  --  10.8.0.0/24          0.0.0.0/0

Offline
*
Re: CSF restart from CWP crash iptables...
« Reply #3 on: April 08, 2015, 12:44:00 PM »
umh,csf doesn't accept

Code: [Select]
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
Error:[iptables v1.4.7: Invalid target name `MASQUERADE]

Offline
*
Re: CSF restart from CWP crash iptables...
« Reply #4 on: April 09, 2015, 09:23:54 AM »
got it!
I opened /usr/local/csf/bin/csfpost.sh with vim and the option :e ++ff=unix and deleted ^M at the end of each line
now csf is appling the iptables rules correctly