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

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

    iptables -L
    CODE

     

    1. Here's a sample of output.

      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  
      
      
      CODE
  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) 

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

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

     

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

    CentOS

    IPv4

    iptables-save > /etc/sysconfig/iptables
    CODE


    IPv6

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

    IPv4

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


    IPv6

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