230. SuSEFirewall4Network

Module for handling interfaces in SuSEfirewall2

230.1. Summary of Module Globals

List of Global Functions

  • FirewallZonesComboBoxItems - Function returns list of items for combo box with all known firewall zones. There's also an item for "" (no zone or fw off).

  • GetZoneOfInterface - Function returns the firewall zone of interface, "" if no zone includes the interface. Error is reported when interface is found in multiple firewall zones, then the first appearance is returned. If firewall is off, "" is returned.

  • IsOn -

  • IsProtectedByFirewall - Function returns if interface is protected by firewall. It means: Firewall is Running and Enabled. Interface is included in any protected firewall zone (means EXT, DMZ or INT).

  • ProtectByFirewall - Functions sets protection of interface by the protect-status.<br> protect==true -> add interface into selected firewall zone, sets firewall to be started and enabled when booting.<br> protect==false -> removes interface from all firewall zones, if there are no other interfaces protected by firewall, stops it and removes it from boot process.

  • Read - Function reads configuration of SuSEFirewall.

  • UnconfiguredIsBlocked -

  • Write - Function writes configuration of SuSEFirewall.

List of Global Variables

    230.2. Global Functions

    230.2.1. FirewallZonesComboBoxItems

    Function returns list of items for combo box with all known firewall zones. There's also an item for "" (no zone or fw off).

    Return value

    • list< list<string> > - item list for CWM

    230.2.2. GetZoneOfInterface

    Function returns the firewall zone of interface, "" if no zone includes the interface. Error is reported when interface is found in multiple firewall zones, then the first appearance is returned. If firewall is off, "" is returned.

    Function parameters

    • string interface

    Return value

    • string - zone

    230.2.3. IsOn

    Return value

    • boolean - whether enabled and started

    230.2.4. IsProtectedByFirewall

    Function returns if interface is protected by firewall. It means: Firewall is Running and Enabled. Interface is included in any protected firewall zone (means EXT, DMZ or INT).

    Function parameters

    • string interface

    Return value

    • boolean - if it is protected

    230.2.5. ProtectByFirewall

    Functions sets protection of interface by the protect-status.<br> protect==true -> add interface into selected firewall zone, sets firewall to be started and enabled when booting.<br> protect==false -> removes interface from all firewall zones, if there are no other interfaces protected by firewall, stops it and removes it from boot process.

    Function parameters

    • string interface

    • string zone

    • boolean protect_status

    Return value

    • boolean - if successful

    230.2.6. Read

    Function reads configuration of SuSEFirewall.

    Return value

    • boolean - if successful

    230.2.7. UnconfiguredIsBlocked

    Return value

    • boolean - Whether the UI should warn about interfaces that are not in any zone

    230.2.8. Write

    Function writes configuration of SuSEFirewall.

    Return value

    • boolean - if successful

    230.3. Global Variables

    230.4. Module Requirements

    230.4.1. Module Imports

    • SuSEFirewall

    230.4.2. Module Includes