2014-06-11 08:29:10 +02:00
|
|
|
# This file was auto-generated by Puppet. Do not edit by hand.
|
2012-12-03 23:40:08 +01:00
|
|
|
*filter
|
|
|
|
|
|
|
|
# Set up logging for dropped packets
|
|
|
|
-N LOGDROP
|
|
|
|
-A LOGDROP -m limit --limit 15/min -j LOG --log-prefix "iptables dropped: " --log-level 7
|
|
|
|
-A LOGDROP -j DROP
|
|
|
|
|
|
|
|
# Allow all outbound traffic
|
|
|
|
-A OUTPUT -j ACCEPT
|
|
|
|
|
|
|
|
# Accept all loopback traffic
|
|
|
|
-A INPUT -i lo -j ACCEPT
|
|
|
|
|
|
|
|
# Drop all traffic to loopback IPs on other interfaces
|
|
|
|
-A INPUT ! -i lo -d 127.0.0.0/8 -j LOGDROP
|
|
|
|
|
|
|
|
# Accept incoming traffic related to established connections
|
|
|
|
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
|
|
|
|
|
2014-04-09 00:28:01 +02:00
|
|
|
<% if @fqdn.include? "zmirror" -%>
|
2012-12-03 23:40:08 +01:00
|
|
|
# Accept incoming traffic on TCP port 22 (SSH)
|
|
|
|
-A INPUT -p tcp --dport 22 -j ACCEPT
|
|
|
|
|
|
|
|
# Accept incoming traffic on UDP port 2104 (zhm)
|
|
|
|
-A INPUT -p udp --dport 2104 -j ACCEPT
|
|
|
|
|
|
|
|
# It's hard to know what ephemeral ports the zephyr clients are listening on.
|
|
|
|
# Apparently they do not send outgoing traffic sufficient for the
|
|
|
|
# ESTABLISHED,RELATED rule above. So for now we allow all UDP traffic.
|
|
|
|
#
|
|
|
|
# FIXME: do something better here.
|
|
|
|
-A INPUT -p udp -j ACCEPT
|
2014-04-09 00:28:01 +02:00
|
|
|
<% else -%>
|
2020-10-15 04:21:21 +02:00
|
|
|
|
|
|
|
# Accept incoming traffic on TCP ports:
|
|
|
|
-A INPUT -p tcp --dport ssh -j ACCEPT
|
|
|
|
-A INPUT -p tcp --dport smtp -j ACCEPT
|
|
|
|
-A INPUT -p tcp --dport http -j ACCEPT
|
|
|
|
-A INPUT -p tcp --dport https -j ACCEPT
|
|
|
|
-A INPUT -p tcp --dport postgresql -j ACCEPT
|
|
|
|
|
2020-10-15 04:21:38 +02:00
|
|
|
# Smokescreen proxy
|
|
|
|
-A INPUT -p tcp --dport 4750 -j ACCEPT
|
|
|
|
|
2020-10-15 04:21:21 +02:00
|
|
|
# statsd
|
|
|
|
-A INPUT -p udp --dport 8125 -j ACCEPT
|
2014-04-09 00:28:01 +02:00
|
|
|
<% end -%>
|
2012-12-03 23:40:08 +01:00
|
|
|
|
|
|
|
# Drop everything else
|
|
|
|
-A INPUT -j LOGDROP
|
|
|
|
-A FORWARD -j LOGDROP
|
|
|
|
|
|
|
|
COMMIT
|