Skip to main content
Skip table of contents

Adjusting Linux Firewall Settings

In CentOS and other Linux distros, there may be firewall settings which prevent you from accessing ArangoDB. These can be configured through the “iptables” command.  

 

 

  1.  To use iptables, you have to run as root (su).
  2. Verify iptables is running

    CODE
    lsmod | grep ip_tables
  3. List the current set of rules .

    CODE
    iptables -L

     

    1. Here's a sample of output.

      CODE
      Chain INPUT (policy ACCEPT)
      target     prot opt source               destination        
      ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
      ACCEPT     icmp --  anywhere             anywhere           
      ACCEPT     all  --  anywhere             anywhere           
      ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
      REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited
      
      
      Chain FORWARD (policy ACCEPT)
      target     prot opt source               destination        
      REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited
      
      Chain OUTPUT (policy ACCEPT)
      target     prot opt source               destination  
      
      
  4. It might be necessary to add a rule to allow access to ArangoDB on port 8529.  
    Insert a rule in the INPUT chain, allowing Arango's default listening port (port 8529) 

    CODE
    iptables -I INPUT 1 -p tcp --dport 8529 -j ACCEPT
  5. Verify the rule was added.

    CODE
    iptables -L INPUT
  6.  Look for the following line: 

     

    CODE
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:8529
  7. Save the IPTABLES

    CentOS

    IPv4

    CODE
    iptables-save > /etc/sysconfig/iptables


    IPv6

    CODE
    ip6tables-save > /etc/sysconfig/ip6tables
    Debian or Ubuntu

    IPv4

    CODE
    iptables-save > /etc/iptables/rules.v4


    IPv6

    CODE
    ip6tables-save > /etc/iptables/rules.v6
    Also see https://www.thomas-krenn.com/en/wiki/Saving_Iptables_Firewall_Rules_Permanently
 

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.