Skip to content

Home

Development

IDEs

API Explorer

Releases

Release notes

Martini Runtime

Martini Desktop

Martini Online

Feature requests

Bug reports

Installation behind a firewall

After installation, you might have to configure your firewall to ensure Martini can communicate with other services, applications, and users as expected.

Below are the default ports used by Martini instances:

Protocol Port
HTTP 8080
HTTPS 8443

Modifying ports...

With an on-premise deployment, you can change the ports used by Martini.

The following sub-sections will discuss how to open these ports on different operating systems.

Corporate firewall

Steps may differ if you are configuring your own corporate firewall. If that is the case, it is recommended that you simply open the ports for Martini to allow incoming and outgoing connections.

How to Open Ports

  1. To confirm if the port Martini is using is open, enter the following command in your terminal where <port> is the port number you have configured for Martini:

    1
    iptables -nL | grep <port>
    

    The command above should give you an output similar to below:

    1
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:<port>
    

    If it is open (says ACCEPT), then there is no need to execute the following steps.

  2. If your port is closed, you have two options to open them on a Linux machine:

    • iptables

      1. Open the port by executing the command:

        1
        /sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport <port> -j ACCEPT           
        
      2. Save the change using the command:

        1
        iptables-save > /etc/iptables.rules
        
      3. Restart iptables with:

        1
        /etc/init.d/iptables restart
        

        ... or just reload iptables with:

        1
        /etc/init.d/iptables reload
        
    • firewalld

      1. Open the port by executing the command:

        1
        firewall-cmd --zone=public --add-port=<port>/tcp --permanent
        
      2. Reload the firewall service using:

        1
        firewall-cmd --reload
        

      You can also check if your changes have reflected by entering:

      1
      firewall-cmd --list-all
      

    ESTABLISHED AND RELATED connections

    You must allow ESTABLISHED and RELATED connections for your connections to operate in a two-way fashion. If you have configured iptables before, then you have probably already had this configured. To do so, use the command below:

    1
    iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT    
    

    To allow outgoing traffic for all ESTABLISHED connections, use the following command:

    1
    iptables -A OUTPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT
    

To allow connections on macOS devices, you might need to change the configuration of the macOS firewall via System Preferences. Instead of allowing a port, the instructions below will allow incoming connections to your Martini instance.

  1. First, open the System Preferences window by clicking on the Apple menu and then selecting System Preferences.
  2. Click on Security & Privacy > Firewall > Firewall Options.
  3. Click on the + button underneath the list of allowed applications.
  4. Navigate to and select the java executable that Martini is using. This is usually /usr/bin/java.

    Allow connections

  5. Click OK.

Unlock padlock

Make sure that you have unlocked the padlock on the botom left corner of the screen to make changes.

Unlock padlock

For Windows, the instructions below are using the Windows Defender application to make the required changes.

  1. Display the machine's firewall settings by searching Windows Defender Firewall with Advanced Security.

    Opening Windows Defender

  2. Next, click on Inbound Rules and then select New Rule.

  3. Choose Port and then click Next.
  4. Populte the fields. Afterwards, click Next.
  5. Select Allow the connection.
  6. Check where these rules should apply.
  7. Optionally, you can give your rule a name and a short description.

    Modifying inbound rules

Outbound rules

You may also provision an outbound rule for Martini's port. Do this by selecting Outbound Rules and populating in the fields like above.

Modifying outbound rules