Difference between revisions of "Seon SmartProxy"
(→Starting the process) |
|||
(One intermediate revision by the same user not shown) | |||
Line 132: | Line 132: | ||
The mandatory parameters are: | The mandatory parameters are: | ||
− | *<code>-U</code>: URL of the Seonapi service | + | *<code>-U</code>: URL of the Seonapi service. When using password protected URLs, use a schema of "<code>https://username:password@server/seon/seonapi/index.php</code>" |
*<code>-S</code>: Seon SmartProxy server hostname/IP address (and optionally its port) | *<code>-S</code>: Seon SmartProxy server hostname/IP address (and optionally its port) | ||
*<code>-T</code>: Security token configured in the Seon Proxy configurartion section above | *<code>-T</code>: Security token configured in the Seon Proxy configurartion section above | ||
Line 149: | Line 149: | ||
The Seon SmartProxy server process analyzes incoming connections upon their client certificate and adds non-existing CRL URLs to the Seon database backend by calls via the client connection. A latency for download is defined by the Seon send queue time slice and the above mentioned 60 second latency for configuration update of the server process. | The Seon SmartProxy server process analyzes incoming connections upon their client certificate and adds non-existing CRL URLs to the Seon database backend by calls via the client connection. A latency for download is defined by the Seon send queue time slice and the above mentioned 60 second latency for configuration update of the server process. | ||
+ | |||
+ | HTTP connections from local hosts may result into a configured IPv6 behaviour, where the local hosts has the IP adddress "<code>::1</code>". This special IP address is resolved internally to "<code>127.0.0.1</code>", so if you have problems in configuring a listener, use the IP address "<code>127.0.0.1</code>" for the resolvable hostname or IP address. |
Latest revision as of 15:17, 23 September 2014
Contents
What is Seon SmartProxy
Seon SmartProxy is a software product which enables you to maintain OFTP2 Proxy activities in a very secure manner. This includes:
- Partner verification upon session initialization before OFTP2 takes place
- OFTP2 message syntax verification
- TLS termination in the DMZ
- configurable outgoing IP address
- No configuration values needed in DMZ
- Secure backend communication via https
- Support for both incoming and outgoing connections
- Manageable logging activities supporting intrusion detection systems
- Extended logging of all activities
Differences against Seon Proxy
Seon Proxy supports to forward any TCP/IP package from any source port to any destination via a combination of Seon proxyserver and proxyclient. The protocol used on top of this connection is not under control of this Seon proxy.
Seon SmartProxy terminates the encrypted session of OFTP2 TLS sessions at its end-point (proxy server), verifies any traffic and forwards it securely to the inside proxy client, where it is being transported to the Seon receive daemon. This enables the Seon SmartProxy to analyze the complete traffic used in the communication stream, so invalid packages lead to session termination.
The design of the Seon SmartProxy is that the proxy server and proxy client use as less information as needed for operation. Everything needed for operation is communicated to a secure backend via https.
Involved programs
The used components for the implementation of an Seon SmartProxy are:
- Seon SmartProxy server
- Seon SmartProxy client
- Seonapi, accessed via https
Licensing
Seon Proxy is licensed via a license file at the Seon Proxy (not client) side: only one license is needed to keep the system up and running. This license is based on an Seon Proxy ID on the proxy server side, which can be easily obtained via a command line parameter:
dmz:~ # /opt/seon/proxy/seon_proxyserver2 -L Seon Proxy ID: c6bc8d9b37c5e36333a41acdda653aaef7fd4a00459eeb32a8a41059e23017c8px
This Seon Proxy ID is needed for license generation, which can be done for test purposes on the product website at http://www.seon.de/key.
The valid license will be searched by default at
/etc/seon_proxy.lic
but an alternative location can be given with the commandline option "-l":
dmz:~ # /opt/seon/proxy/seon_proxyserver2 -l /usr/licenses/seon_proxy.lic
Logging
The logging of all activities is important for the Seon SmartProxy. It consists of the following parts:
Seon SmartProxy server and client logging
The logging behaviour of the daemons is configured in the corresponding files in the same directory the binaries reside. They are:
seon_proxyserver.logrc
seon_proxyclient.logrc
The location must be in the binary directory, so you can start the binary from any position, it will search the configuration files in any case in its own directory.
Configure the logging behaviour to your needs according to log4c standard logging mechanism. The new logger layout "seon_layout" and appender "seon_appender" are Seon's own implementations for daily logger: every process logs into the same file, the files itself are being appended by a datestamp. Rolling to another logfile is done automatically.
Seonapi logging
The Seonapi is being used for all backend communication, so you configure the logfile and path in "Configuration" -> "Logging" -> "Absolute path to logfile of Seon API" and set the loglevel accordingly. The configuration takes place directly after saving.
Seon API proxy system log event script
According to requests, the Seonapi starts an event script for every critical situation the Seon SmartProxy arises. This event script is configurable at "Configuration" -> "Events" -> "Seon API proxy system log event script"
Handling system logging
Since situations can occur very often and and a high frequency, Seon offers to ignore system logs. In the area "Configuration" -> "Proxy" -> "Log message ignore configuration" you can dynamically add and remove text message entries with a description, the matching text contained in the message (which must noch be exactly the text since the message will be searched for an occurance case-insensitively fro the given text) and a validity timeframe. The Seon send queue daemon cleans old entries of this configuration and logs this into the system log. If a message is being matched by a configuration, the Seonapi logs this in INFO mode to the configured log file.
PID files
Both the Seon OFTP2 SmartProxy server and client create PID files containing the process ID of the process itself. The position of these PID files is the directory where the binary is located. If a PID file exists on startup, the daemon will fail to start stating the references process ID. You then have to check if this process really exists:
- If yes, send the process a SIGHUP (1) signal to terminate. The PID fill will be deleted, the logfile will contain a logging entry stating this situation in DEBUG level.
- If not, delete the stale PID file
Dynamic logging of daemons
The daemons can receive signals and will then change their logging behaviour on-the-fly. Since every active connections corresponds to an own process, you can send individual processes their own signals for problem analysis. The signal numbers and their loglevels are:
- 20: TRACE
- 21: DEBUG
- 22: INFO
- 23: ERROR
- 24: FATAL
Each change of loglevel will be logged in the logfile with the selected log level.
Example 1: change loglevel to INFO for running Seon OFTP2 SmartProxy client with PID 82735
kill -22 82735
Example 2: change loglevel to FATAL for running Seon OFTP2 SmartProxy server with PID 21521
kill -24 21521
Seon SmartProxy server
The Seon SmartProxy server is the part which connects to the outside world and which must be reachable via a defined port on the internet. The port on which the server listens to is configured in the Seon administrative panel, "Configuration" -> "TCP/IP" -> "TCP/IP port of OFTP server (TLS)".
Command line parameters for the server are listed by calling the binary with the parameter "-h
":
dmz:/opt/seon/proxy seon$ ./seon_proxyserver2 -h Seon Proxy daemon build 20111115 usage: -h: this help text -v: display version -i [<IP of device>]:<port>: accept from (optional) device on given port for internal connections. defaults: IP of device: 0.0.0.0 (any) --------- port: 2878 -L: print out Seon Proxy ID (basis for license) -l <license file>: point to readable license file (default: /etc/seon_proxy.lic) -V: print out license validity, if available and exit
After having started the server, it listens on an internal port for the Seon SmartProxy client to connect. This port number can be changed by parameter "-i
", in addition to a confiured IP address to listen on.
Only after a successful connect of a Seon SmartProxy client, the Seon SmartProxy server is able to retrieve its configuration from the backend and start listening on the configured TCP/IP port for incoming connections.
Seon SmartProxy client
The Seon SmartProxy client connects to the started Seon SmartProxy server and communicates via https to the Seonapi, configured to via commandline parameters. The client also forwards internal sessions to a configured host (mostly "localhost
") as configured in the configuration panel. The client needs a pre-rendered security token for the communication with the Seonapi.
Configuration
The Seon SmartProxy client configuration is done via web interface in the Seon administrative panel at "Configuration" -> "Proxy":
The configuration parameter are as follow:
- Hostname or IP address of host running Seon receive daemon (mandatory for incoming connections): the host (resolvable hostname or IP address) of the host running Seon receive daemon, to which all OFTP2 incoming communication will be forwarded.
- Seon Proxy client security token: pre-rendered security token (mandatory): pre-shared token for communication to the Seonapi proxy services. All non-authentificated communication tries will be logged to the Seonapi log file.
- IP address of outgoing proxy connections (optional): If you want to use a defined outgoing IP address at the proxy server, you can define it here. If this IP address is not available at the Seon SmartProxy server, an error will be logged to the Seon system log and the server process will stop.
The block "Proxy client configuration" defines all available Seon OFTP2 SmartProxy clients. The Seon SmartProxy client retrieves his configuration of his listening port dynamically from this configuration, so be sure to configure your client with his IP address correctly here!
The block "Log message ignore configuration" is configured in the section "Handling system logging" above.
Starting the process
The Seon SmartProxy client needs some command line parameter to start up. All available parameters are displayed when starting the binary without any or with the parameter "-h
":
appzone:/opt/seon/proxy seon$ ./seon_proxyclient2 -h Seon Proxy client build 20111115 usage: -U <URL>: URL of Seon API (i.e. https://localhost/seonapi/index.php) -S <proxyserver[:<port>]: name or IP of the Seon OFTP2 proxy server, optionally with pot (default: 2878) -T <security token>: name or IP of the Seon OFTP2 proxy server, optionally with pot (default: 2878) [-h: this help text] [-v: display version] [-d: enable debug mode]
The mandatory parameters are:
-U
: URL of the Seonapi service. When using password protected URLs, use a schema of "https://username:password@server/seon/seonapi/index.php
"-S
: Seon SmartProxy server hostname/IP address (and optionally its port)-T
: Security token configured in the Seon Proxy configurartion section above
The switch "-d
" starts the daemon in foreground mode, so you can easily cancel it by pressing "Ctrl-C", no other output will be displayed (as someone may assume).
Process behaviour
If the Seon SmartProxy server terminates, the connected client terminates, too.
If the Seon SmartProxy client terminates, the server switches back to "listen for internal connection".
Each incoming connection which has been verified leads to a new Seon SmartProxy server process and a new Seon SmartProxy client process. The Seon SmartProxy client process opens a new connection to the configured Seon receive daemon host.
The Seon SmartProxy server process checks every 60 seconds for an updated security configuration if a client process is connected. This ongoing traffic generates calls at the Seonapi. This 60 second latency must be taken into account when administrating trusted certificates and CRLs.
The Seon SmartProxy server process analyzes incoming connections upon their client certificate and adds non-existing CRL URLs to the Seon database backend by calls via the client connection. A latency for download is defined by the Seon send queue time slice and the above mentioned 60 second latency for configuration update of the server process.
HTTP connections from local hosts may result into a configured IPv6 behaviour, where the local hosts has the IP adddress "::1
". This special IP address is resolved internally to "127.0.0.1
", so if you have problems in configuring a listener, use the IP address "127.0.0.1
" for the resolvable hostname or IP address.