Step-by-Step: Configuring Mendelson OpenSource OFTP2 for Enterprise Use

Step-by-Step: Configuring Mendelson OpenSource OFTP2 for Enterprise Use

This guide walks through configuring Mendelson OpenSource OFTP2 for a typical enterprise deployment. Assumptions: Linux server (Ubuntu 22.04 LTS), Java 11+, open network ports allowed for OFTP2 (port 3305 TCP by default), and a named enterprise user for the service. Adjust paths and user names as needed.

1. Prepare the server

  1. Update OS and install Java
    • Ubuntu:

      Code

      sudo apt update && sudo apt upgrade -y sudo apt install openjdk-11-jre-headless -y
  2. Create service user and directories

    Code

    sudo useradd -r -s /bin/false oftp2 sudo mkdir -p /opt/mendelson-oftp2 /var/lib/mendelson-oftp2/{in,out,archive} sudo chown -R oftp2:oftp2 /opt/mendelson-oftp2 /var/lib/mendelson-oftp2

2. Download and install Mendelson OFTP2

  1. Download package
    • Get the latest Mendelson OFTP2 ZIP/TAR from the official Mendelson website. (Use your browser or wget; example:)

      Code

      sudo -u oftp2 wget -O /tmp/mendelson-oftp2.zip “https://mendelson-e-c.com/downloads/mendelson-oftp2.zip” sudo -u oftp2 unzip /tmp/mendelson-oftp2.zip -d /opt/mendelson-oftp2
  2. Set executable permissions

    Code

    sudo chmod +x /opt/mendelson-oftp2/bin/*.sh

3. Initial configuration (service basics)

  1. Edit main configuration
    • Primary config file is typically in /opt/mendelson-oftp2/conf or similar. Example edits:
      • Set working paths to /var/lib/mendelson-oftp2/in (incoming), /var/lib/mendelson-oftp2/out (outgoing), /var/lib/mendelson-oftp2/archive.
      • Configure logging path and log level.
  2. Configure Java options
    • Add JVM memory settings in the start script:

      Code

      -Xms512m -Xmx2g
  3. Create systemd service

    Code

    sudo tee /etc/systemd/system/mendelson-oftp2.service > /dev/null <[Unit] Description=Mendelson OFTP2 Service After=network.target[Service] User=oftp2 Group=oftp2 ExecStart=/opt/mendelson-oftp2/bin/start.sh SuccessExitStatus=143 Restart=on-failure RestartSec=10

    [Install] WantedBy=multi-user.target EOF

    sudo systemctl daemon-reload sudo systemctl enable –now mendelson-oftp2

4. Network and firewall

  1. Open OFTP2 port (default 3305 TCP)

    Code

    sudo ufw allow 3305/tcp sudo ufw reload
  2. Set up NAT/port forwarding if behind firewall or load balancer — forward external port to server port 3305.

5. OFTP2-specific settings

  1. Certificates and keys
    • Generate or import X.509 certificates for host identity and encryption. Place keystores in the conf directory and reference them in the OFTP2 configuration.
    • Example using keytool:

      Code

      keytool -genkeypair -alias oftp2-host -keyalg RSA -keysize 2048 -keystore /opt/mendelson-oftp2/conf/oftp2-keystore.jks
  2. Partners and profiles
    • Add partner entries (AS2 ID / partner ID, host, port, certificates). Use the admin UI or edit partner config files directly.
    • Configure profiles for compression, encryption, and allowed cipher suites to match trading partner requirements.
  3. Routing and mapping
    • Define rules for incoming file placement (by partner, filename pattern) and outgoing routing destinations.
    • Configure archive retention policies and automatic purging if needed.

6. Security hardening

  • Run service under non-privileged user (done above).
  • Restrict SSH and management access to specific IPs (use firewall).
  • Enable TLS-only cipher suites and disable weak protocols.
  • Log rotation: configure logrotate for Mendelson logs.

    Code

    /var/log/mendelson-oftp2/*.log { weekly rotate 4 compress missingok notifempty copytruncate }
  • Backup configuration and keystores regularly to secure offsite storage.

7. Testing and validation

  1. Basic start/stop

    Code

    sudo systemctl status mendelson-oftp2 sudo journalctl -u mendelson-oftp2 -f
  2. Connectivity test
    • From partner host:

      Code

      nc -vz your.oftp2.server 3305
  3. End-to-end transfer
    • Exchange test files with a trading partner using agreed-upon profile (encryption/compression). Verify successful receipt, logs, and archive entries.
  4. Certificate validation
    • Confirm certificate chain and fingerprint match partner expectations.

8. Monitoring and maintenance

  • Automated alerts: integrate service checks into monitoring (Nagios/Prometheus) — check process, port, and error log patterns.
  • Regular updates: apply Mendelson releases and Java security patches.
  • Capacity planning: monitor throughput and storage; scale JVM memory or add disk as needed.

9. Troubleshooting (common issues)

  • Service won’t start: check logs (journalctl + Mendelson logs) for missing keystore or bad config.
  • Handshake failures: mismatched certificates or unsupported cipher suites — verify partner config and keystore.
  • Permission errors: ensure files and directories owned by oftp2 user.
  • Port blocked: confirm firewall and network path.

10. Example configuration checklist

  • Java installed (11+)
  • Service user created and permissions set
  • Mendelson files in /opt/mendelson-oftp2
  • Working directories in /var/lib/mendelson-oftp2
  • systemd service configured and running
  • Port 3305 allowed through firewall
  • Keystore and certificates installed
  • Partner entries configured
  • Tests completed and monitoring in place

If you want, I can produce sample config snippets for your specific Mendelson OFTP2 version or generate systemd/start scripts customized to your environment — tell me OS, Java version, and the desired installation paths.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *