ClearFoundation

Developer API Reference FirewallForward

ClearOS API

Class FirewallForward

Description

Firewall forward connections config.

Located in /api/FirewallForward.class.php (line 58)

Engine
   |
   --Software
      |
      --Daemon
         |
         --Firewall
            |
            --FirewallForward
Method Summary
FirewallForward __construct ()
void __destruct ()
void AddForwardPort (string $nickname, string $protocol, int $fromport,  $toport,  $toip)
void AddForwardPortRange (string $nickname, string $protocol, int $lowport, int $highport, string $toip)
void AddForwardStandardService (string $nickname, string $service, string $toip)
void DeleteForwardPort (string $protocol, int $fromport, int $toport, string $toip)
void DeleteForwardPortRange (string $protocol, int $lowport, int $highport, string $toip)
array GetForwardPorts ()
array GetPptpServer ()
void SetPptpServer (string $ip)
void ToggleEnableForwardPort (boolean $enabled, string $protocol, int $fromport, int $toport, string $toip)
void ToggleEnableForwardPortRange (boolean $enabled, string $protocol, int $lowport, int $highport, string $toip)
void ToggleEnablePptpServer (boolean $enabled, string $ip)
Methods
Constructor __construct (line 64)

FirewallForward constructor.

  • access: public
FirewallForward __construct ()

Redefinition of:
Firewall::__construct()
Firewall constructor.
Destructor __destruct (line 584)
  • access: public
void __destruct ()

Redefinition of:
Daemon::__destruct()
AddForwardPort (line 84)

Add a port/to the forward allow list.

  • throws: EngineException
  • access: public
void AddForwardPort (string $nickname, string $protocol, int $fromport,  $toport,  $toip)
  • string $nickname: nickname optional rule nickname
  • string $protocol: protocol the protocol - UDP/TCP
  • int $fromport: port port number
  • $toport
  • $toip
AddForwardPortRange (line 132)

Add a port range to the forward allow list.

  • throws: EngineException
  • access: public
void AddForwardPortRange (string $nickname, string $protocol, int $lowport, int $highport, string $toip)
  • string $nickname: nickname optional rule nickname
  • string $protocol: protocol the protocol - UDP/TCP
  • int $lowport: lowport low port number
  • int $highport: highport high port number
  • string $toip: toip the destination ip address
AddForwardStandardService (line 172)

Add a standard service to the forward allow list.

  • throws: EngineException
  • access: public
void AddForwardStandardService (string $nickname, string $service, string $toip)
  • string $nickname: nickname optional rule nickname
  • string $service: service service name eg HTTP, FTP, SMTP
  • string $toip: toip the destination ip address
DeleteForwardPort (line 333)

Delete a port from the forward allow list.

  • throws: EngineException
  • access: public
void DeleteForwardPort (string $protocol, int $fromport, int $toport, string $toip)
  • string $protocol: protocol the protocol - UDP/TCP
  • int $fromport: fromport from port number
  • int $toport: toport to port number
  • string $toip: toip target IP address
DeleteForwardPortRange (line 363)

Delete a port range from the forward range allow list.

  • throws: EngineException
  • access: public
void DeleteForwardPortRange (string $protocol, int $lowport, int $highport, string $toip)
  • string $protocol: protocol the protocol - UDP/TCP
  • int $lowport: lowport low port number
  • int $highport: highport high port number
  • string $toip: toip target IP address
GetForwardPortRanges (line 459)

Gets allowed forward port ranges. The information is an array with the following hash array entries:

info[enabled] info[protocol] info[nickname] info[toip] info[lowport] info[highport]

  • return: array containing allowed forward ports
  • access: public
array GetForwardPortRanges ()
GetForwardPorts (line 397)

Gets allowed forward ports. The information is an array with the following hash array entries:

info[enabled] info[protocol] info[nickname] info[fromport] info[toip] info[toport] info[service] (FTP, HTTP, etc.)

  • return: array containing allowed forward ports
  • throws: EngineException
  • access: public
array GetForwardPorts ()
GetPptpServer (line 517)

Gets IP of PPTP server behind the firewall. The result is a single element array with the following fields:

info[enabled] info[host]

  • return: array containing the IP of a PPTP server
  • throws: EngineException
  • access: public
array GetPptpServer ()
SetPptpServer (line 550)

Sets PPTP forwarding to the given IP address.

  • throws: EngineException
  • access: public
void SetPptpServer (string $ip)
  • string $ip: ip IP of PPTP server
ToggleEnableForwardPort (line 222)

Enable/disable a port from the forward allow list.

  • throws: EngineException
  • access: public
void ToggleEnableForwardPort (boolean $enabled, string $protocol, int $fromport, int $toport, string $toip)
  • boolean $enabled: enabled rule enabled?
  • string $protocol: protocol the protocol - UDP/TCP
  • int $fromport: fromport from port number
  • int $toport: toport to port number
  • string $toip: toip target IP address
ToggleEnableForwardPortRange (line 261)

Enable/disable a port range from the forward range allow list.

  • throws: EngineException
  • access: public
void ToggleEnableForwardPortRange (boolean $enabled, string $protocol, int $lowport, int $highport, string $toip)
  • boolean $enabled: enabled rule enabled?
  • string $protocol: protocol the protocol - UDP/TCP
  • int $lowport: lowport low port number
  • int $highport: highport high port number
  • string $toip: toip target IP address
ToggleEnablePptpServer (line 296)

Enable/disable PPTP forwarding.

  • throws: EngineException
  • access: public
void ToggleEnablePptpServer (boolean $enabled, string $ip)
  • boolean $enabled: enabled rule enabled?
  • string $ip: ip IP of PPTP server

Inherited Methods

Inherited From Firewall

Firewall::__construct()
Firewall::AddHost()
Firewall::AddMac()
Firewall::AddPort()
Firewall::AddPortRange()
Firewall::AddRule()
Firewall::AddStandardService()
Firewall::DeleteHost()
Firewall::DeleteMac()
Firewall::DeletePort()
Firewall::DeletePortRange()
Firewall::DeleteRule()
Firewall::FindRule()
Firewall::GetHosts()
Firewall::GetInterfaceDefinition()
Firewall::GetInterfaceRole()
Firewall::GetInterfaceRoleText()
Firewall::GetMacs()
Firewall::GetMode()
Firewall::GetPortRanges()
Firewall::GetPorts()
Firewall::GetRules()
Firewall::GetStandardServiceList()
Firewall::GetState()
Firewall::GetValue()
Firewall::IsValidIp()
Firewall::IsValidMac()
Firewall::IsValidMode()
Firewall::IsValidPort()
Firewall::IsValidPortRange()
Firewall::IsValidProtocol()
Firewall::IsValidServer()
Firewall::IsValidService()
Firewall::LookupHostMetainfo()
Firewall::LookupService()
Firewall::RemoveInterfaceRole()
Firewall::SetInterface()
Firewall::SetInterfaceRole()
Firewall::SetMode()
Firewall::SetRules()
Firewall::SetState()
Firewall::SetValue()

Inherited From Daemon

Daemon::__construct()
Daemon::GetBootState()
Daemon::GetProcessName()
Daemon::GetRunningState()
Daemon::GetTitle()
Daemon::Reset()
Daemon::Restart()
Daemon::SetBootState()
Daemon::SetRunningState()
Daemon::__destruct()

Inherited From Software

Software::__construct()
Software::GetCopyright()
Software::GetDescription()
Software::GetInstallSize()
Software::GetInstallTime()
Software::GetPackageName()
Software::GetPackager()
Software::GetRelease()
Software::GetRpmInfo()
Software::GetSummary()
Software::GetVersion()
Software::IsInstalled()
Software::__destruct()

Inherited From Engine

Engine::__construct()
Engine::AddValidationError()
Engine::CheckValidationErrors()
Engine::CopyValidationErrors()
Engine::GetValidationErrors()
Engine::Log()
Engine::__destruct()

Documentation generated on Fri, 28 Aug 2009 20:32:06 -0400 by phpDocumentor 1.3.2