Feature #866

Firewall adjust action

Added by Davide Principi over 9 years ago. Updated over 8 years ago.

Status:CLOSEDStart date:03/13/2012
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-base
Target version:DEV1
Resolution: NEEDINFO:

Description

The firewall-adjust action acts on the firewall configuration, to allow access to enabled services only.

For each service key in the configuration database:
  • if service has status=enabled invoke enable script
  • else invoke disable script

At the end, invoke apply script, to persist changes.

Each script receives ${SERVICE}, ${PORT}, ${PROTO} parameters

Scripts are stored under firewall key in configuration database: by default they invoke lokkit.

Script templates (for lokkit backend)

OPEN

  /usr/bin/lokkit -n -p ${PORT}:${PROTO}

CLOSE

   sed -i /^--port=${PORT}:${PROTO}/d /etc/sysconfig/system-config-firewall; 

APPLY

   /usr/bin/lokkit --update


Related issues

Related to NethServer 6 - Enhancement #1875: Base: implement firewall-adjust event CLOSED

Associated revisions

Revision 9c57e7ec
Added by Davide Principi over 9 years ago

firewall-adjust: added action and default lokkit-based configuration. Refs #866 - Firewall adjust action

Revision d79ffdbf
Added by Davide Principi over 9 years ago

nethserver-httpd-admin-update: linked firewall-adjust, runlevel-adjust actions. Refs #866, #867

Revision a672508c
Added by Davide Principi over 9 years ago

firewall-adjust: fixed prop names Port|Ports. Refs #866 - Firewall adjust action

Revision a97c9e4e
Added by Davide Principi over 9 years ago

modSSL: set ServiceFirewallName to https. Refs #866 - Firewall adjust action

Revision a7c23363
Added by Davide Principi over 8 years ago

firewall-adjust action: skip unchanged service port configurations. Refs #866 -- Firewall adjust action

Revision b7695ea2
Added by Davide Principi over 8 years ago

firewall-adjust action: previous open port list is now stored in `__fwAdjust` prop, to keep it distinct from others. Refs #866

Revision c9b95ed2
Added by Davide Principi over 8 years ago

firewall-adjust action: clear __fwAdjust* prop when action is CLOSE. Refs #866 -- Firewall adjust action

Revision fc748078
Added by Davide Principi over 8 years ago

firewall-adjust action: skip unchanged service configurations. Refs #866 -- Firewall adjust action

History

#1 Updated by Davide Principi over 9 years ago

  • Status changed from NEW to ON_DEV
  • Assignee set to Davide Principi
  • % Done changed from 0 to 90

#2 Updated by Davide Principi over 9 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 90 to 100

#3 Updated by Davide Principi over 8 years ago

  • Project changed from 1 to NethServer 6

Also available in: Atom PDF