You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
846 B
27 lines
846 B
# Firewall configuration written by system-config-firewall
|
|
# Manual customization of this file is not recommended.
|
|
*filter
|
|
:INPUT ACCEPT [0:0]
|
|
:FORWARD ACCEPT [0:0]
|
|
:OUTPUT ACCEPT [0:0]
|
|
{% if 'mongoc_servers' in group_names %}
|
|
-A INPUT -p tcp --dport 7777 -j ACCEPT
|
|
{% endif %}
|
|
{% if 'mongos_servers' in group_names %}
|
|
-A INPUT -p tcp --dport 8888 -j ACCEPT
|
|
{% endif %}
|
|
{% if 'mongo_servers' in group_names %}
|
|
{% for host in groups['mongo_servers'] %}
|
|
-A INPUT -p tcp --dport {{ hostvars[host]['mongod_port'] }} -j ACCEPT
|
|
{% endfor %}
|
|
{% endif %}
|
|
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
|
|
-A INPUT -p icmp -j ACCEPT
|
|
-A INPUT -i lo -j ACCEPT
|
|
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
|
|
-A INPUT -j REJECT --reject-with icmp-host-prohibited
|
|
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
|
|
COMMIT
|
|
|
|
|
|
|
|
|