New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fmFirewall Load Rules after restart #309

Closed
air101 opened this Issue Apr 13, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@air101

air101 commented Apr 13, 2016

Hi WillyXJ,

is it possible that you include a code that fmFirewall rules are applied after a server restart again? I know I could do this via cron or rc.local but it would be a nice feature :)

Thank you and Best Regards

air

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Apr 13, 2016

EL-based Linux systems get the rules applied at boot already because the rules are stored in /etc/sysconfig/iptables. This feature request would be for other Linux distros which could get complicated.

Debian-based: Add a script to /etc/network/if-pre-up.d/ to run iptables-restore
Arch: Rules should be stored in /etc/iptables/iptables.rules
SuSE: FW_CUSTOMRULES should be set to fmFirewall.rules in /etc/sysconfig/SuSEfirewall2
Gentoo: Rules should be stored in /var/lib/iptables/rules-save
Slackware: Rules should be stored in /etc/rc.d/rc.firewall

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Apr 13, 2016

fmFirewall already uses the proper file locations for most Linux distros:

'iptables' => array(
    'Arch'      => '/etc/iptables/iptables.rules',
    'Fedora'    => '/etc/sysconfig/iptables',
    'Redhat'    => '/etc/sysconfig/iptables',
    'CentOS'    => '/etc/sysconfig/iptables',
    'ClearOS'   => '/etc/sysconfig/iptables',
    'Oracle'    => '/etc/sysconfig/iptables',
    'Gentoo'    => '/var/lib/iptables/rules-save',
    'Slackware' => '/etc/rc.d/rc.firewall'
),

The only change I see is to support automatically loading the rules for debian-based systems.

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Apr 25, 2016

v1.3 has been released and contains this fix.

@WillyXJ WillyXJ closed this Apr 25, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment