class ferm::per-host {
- if $::hostname in [ancina,zandonai,zelenka] {
+ if $::hostname in [zandonai,zelenka] {
include ferm::zivit
}
- if $::hostname in [glinka,klecker,merikanto,ravel,rietz,senfl,sibelius,stabile] {
+ if $::hostname in [glinka,klecker,rietz,sibelius] {
ferm::rule { 'dsa-rsync':
domain => '(ip ip6)',
description => 'Allow rsync access',
}
case $::hostname {
- piatti,samosa: {
- @ferm::rule { 'dsa-udd-stunnel':
- description => 'port 8080 for udd stunnel',
- rule => '&SERVICE_RANGE(tcp, http-alt, ( 192.25.206.16 70.103.162.29 217.196.43.134 ))'
+ bm-bl9: {
+ @ferm::rule { 'dsa-iscsi':
+ description => 'Allow iscsi access',
+ rule => '&SERVICE_RANGE(tcp, 3260, ( 5.153.231.240/27 172.29.123.0/24 ))'
}
}
- ullmann: {
- @ferm::rule { 'dsa-postgres-udd':
- description => 'Allow postgress access',
- # quantz, wagner, master
- rule => '&SERVICE_RANGE(tcp, 5452, ( 206.12.19.122/32 217.196.43.134/32 217.196.43.132/32 82.195.75.110/32 ))'
+ oyens: {
+ @ferm::rule { 'dsa-spice':
+ description => 'Allow spice-console access',
+ rule => '&SERVICE(tcp, 6082)'
}
- @ferm::rule { 'dsa-postgres-udd6':
- domain => '(ip6)',
- description => 'Allow postgress access',
- # quantz
- rule => '&SERVICE_RANGE(tcp, 5452, ( 2607:f8f0:610:4000:216:36ff:fe40:3860/128 2001:41b8:202:deb:216:36ff:fe40:4001/128 ))'
+ @ferm::rule { 'dsa-memcache':
+ description => 'Allow memcache access',
+ rule => '&SERVICE_RANGE(tcp, 11211, ( 5.153.231.240/27 172.29.123.0/24 ))'
}
- }
- grieg: {
- @ferm::rule { 'dsa-postgres-ullmann':
- description => 'Allow postgress access',
- rule => '&SERVICE_RANGE(tcp, 5433, ( 206.12.19.141/32 ))'
+ @ferm::rule { 'dsa-memcache6':
+ domain => 'ip6',
+ description => 'Allow memcache access',
+ rule => '&SERVICE_RANGE(tcp, 11211, ( 2001:41c8:1000::/48 ))'
}
- @ferm::rule { 'dsa-postgres-ullmann6':
- domain => '(ip6)',
- description => 'Allow postgress access',
- rule => '&SERVICE_RANGE(tcp, 5433, ( 2607:f8f0:610:4000:6564:a62:ce0c:138d/128 ))'
+ @ferm::rule { 'dsa-amqp':
+ description => 'Allow rabbitmq access',
+ rule => '&SERVICE_RANGE(tcp, 5672, ( 5.153.231.240/27 172.29.123.0/24 ))'
}
- }
- czerny,clementi: {
- @ferm::rule { 'dsa-upsmon':
- description => 'Allow upsmon access',
- rule => '&SERVICE_RANGE(tcp, 3493, ( 82.195.75.64/26 192.168.43.0/24 ))'
+ @ferm::rule { 'dsa-amqp6':
+ domain => 'ip6',
+ description => 'Allow rabbitmq access',
+ rule => '&SERVICE_RANGE(tcp, 5672, ( 2001:41c8:1000::/48 ))'
}
- }
- danzi: {
- @ferm::rule { 'dsa-postgres-danzi':
- description => 'Allow postgress access',
- rule => '&SERVICE_RANGE(tcp, 5433, ( 206.12.19.0/24 ))'
+ @ferm::rule { 'dsa-keystone':
+ description => 'Allow keystone access',
+ rule => '&SERVICE_RANGE(tcp, 5000, ( 5.153.231.240/27 172.29.123.0/24 ))'
}
- @ferm::rule { 'dsa-postgres-danzi6':
+ @ferm::rule { 'dsa-keystone6':
domain => 'ip6',
- description => 'Allow postgress access',
- rule => '&SERVICE_RANGE(tcp, 5433, ( 2607:f8f0:610:4000::/64 ))'
+ description => 'Allow keystone access',
+ rule => '&SERVICE_RANGE(tcp, 5000, ( 2001:41c8:1000::/48 ))'
}
-
- @ferm::rule { 'dsa-postgres2-danzi':
- description => 'Allow postgress access2',
- rule => '&SERVICE_RANGE(tcp, 5437, ( 206.12.19.0/24 ))'
+ @ferm::rule { 'dsa-keystone-admin':
+ description => 'Allow keystone access',
+ rule => '&SERVICE_RANGE(tcp, 35357, ( 5.153.231.240/27 172.29.123.0/24 ))'
}
- @ferm::rule { 'dsa-postgres3-danzi':
- description => 'Allow postgress access3',
- rule => '&SERVICE_RANGE(tcp, 5436, ( 206.12.19.0/24 ))'
+ @ferm::rule { 'dsa-keystone-admin6':
+ domain => 'ip6',
+ description => 'Allow keystone access',
+ rule => '&SERVICE_RANGE(tcp, 35357, ( 2001:41c8:1000::/48 ))'
}
- @ferm::rule { 'dsa-postgres4-danzi':
- description => 'Allow postgress access4',
- rule => '&SERVICE_RANGE(tcp, 5438, ( 206.12.19.0/24 ))'
+ @ferm::rule { 'dsa-glance-api':
+ description => 'Allow glance access',
+ rule => '&SERVICE_RANGE(tcp, 9292, ( 5.153.231.240/27 172.29.123.0/24 ))'
}
- }
- abel,alwyn,rietz: {
- @ferm::rule { 'dsa-tftp':
- description => 'Allow tftp access',
- rule => '&SERVICE(udp, 69)'
+ @ferm::rule { 'dsa-glance-api6':
+ domain => 'ip6',
+ description => 'Allow glance access',
+ rule => '&SERVICE_RANGE(tcp, 9292, ( 2001:41c8:1000::/48 ))'
+ }
+ @ferm::rule { 'dsa-glance-registry':
+ description => 'Allow glance access',
+ rule => '&SERVICE_RANGE(tcp, 9191, ( 5.153.231.240/27 172.29.123.0/24 ))'
+ }
+ @ferm::rule { 'dsa-glance-registry6':
+ domain => 'ip6',
+ description => 'Allow glance access',
+ rule => '&SERVICE_RANGE(tcp, 9191, ( 2001:41c8:1000::/48 ))'
+ }
+ @ferm::rule { 'dsa-neutron':
+ description => 'Allow glance access',
+ rule => '&SERVICE_RANGE(tcp, 9696, ( 5.153.231.240/27 172.29.123.0/24 ))'
+ }
+ @ferm::rule { 'dsa-neutron6':
+ domain => 'ip6',
+ description => 'Allow glance access',
+ rule => '&SERVICE_RANGE(tcp, 9696, ( 2001:41c8:1000::/48 ))'
+ }
+ @ferm::rule { 'dsa-nova-ec2':
+ description => 'Allow nova access',
+ rule => '&SERVICE_RANGE(tcp, 8773, ( 5.153.231.240/27 172.29.123.0/24 ))'
+ }
+ @ferm::rule { 'dsa-nova-ec26':
+ domain => 'ip6',
+ description => 'Allow nova access',
+ rule => '&SERVICE_RANGE(tcp, 8773, ( 2001:41c8:1000::/48 ))'
+ }
+ @ferm::rule { 'dsa-nova2':
+ description => 'Allow nova access',
+ rule => '&SERVICE_RANGE(tcp, 8774, ( 5.153.231.240/27 172.29.123.0/24 ))'
+ }
+ @ferm::rule { 'dsa-nova26':
+ domain => 'ip6',
+ description => 'Allow nova access',
+ rule => '&SERVICE_RANGE(tcp, 8774, ( 2001:41c8:1000::/48 ))'
+ }
+ @ferm::rule { 'dsa-nova-metadata':
+ description => 'Allow nova access',
+ rule => '&SERVICE_RANGE(tcp, 8775, ( 5.153.231.240/27 172.29.123.0/24 ))'
+ }
+ @ferm::rule { 'dsa-nova-metadata6':
+ domain => 'ip6',
+ description => 'Allow nova access',
+ rule => '&SERVICE_RANGE(tcp, 8775, ( 2001:41c8:1000::/48 ))'
+ }
+ @ferm::rule { 'dsa-cinder':
+ description => 'Allow nova access',
+ rule => '&SERVICE_RANGE(tcp, 8776, ( 5.153.231.240/27 172.29.123.0/24 ))'
+ }
+ @ferm::rule { 'dsa-cinder6':
+ domain => 'ip6',
+ description => 'Allow nova access',
+ rule => '&SERVICE_RANGE(tcp, 8776, ( 2001:41c8:1000::/48 ))'
}
}
- paganini: {
- @ferm::rule { 'dsa-dhcp':
- description => 'Allow dhcp access',
- rule => '&SERVICE(udp, 67)'
+ }
+ case $::hostname {
+ czerny,clementi: {
+ @ferm::rule { 'dsa-upsmon':
+ description => 'Allow upsmon access',
+ rule => '&SERVICE_RANGE(tcp, 3493, ( 82.195.75.64/26 192.168.43.0/24 ))'
}
- @ferm::rule { 'dsa-tftp':
- description => 'Allow tftp access',
- rule => '&SERVICE(udp, 69)'
+ }
+ bendel: {
+ @ferm::rule { 'listmaster-ontp-in':
+ description => 'ONTP has a broken mail setup',
+ table => 'filter',
+ chain => 'INPUT',
+ rule => 'source 188.165.23.89/32 proto tcp dport 25 jump DROP',
+ }
+ @ferm::rule { 'listmaster-ontp-out':
+ description => 'ONTP has a broken mail setup',
+ table => 'filter',
+ chain => 'OUTPUT',
+ rule => 'destination 78.8.208.246/32 proto tcp dport 25 jump DROP',
}
}
- lotti,lully: {
+ lotti,lully,loghost-grnet-01: {
@ferm::rule { 'dsa-syslog':
description => 'Allow syslog access',
rule => '&SERVICE_RANGE(tcp, 5140, $HOST_DEBIAN_V4)'
}
}
draghi: {
- #@ferm::rule { 'dsa-bind':
- # domain => '(ip ip6)',
- # description => 'Allow nameserver access',
- # rule => '&TCP_UDP_SERVICE(53)'
- #}
@ferm::rule { 'dsa-finger':
domain => '(ip ip6)',
description => 'Allow finger access',
description => 'Allow ldaps access',
rule => '&SERVICE(tcp, 636)'
}
- @ferm::rule { 'dsa-vpn':
- description => 'Allow openvpn access',
- rule => '&SERVICE(udp, 17257)'
+ }
+ sonntag: {
+ @ferm::rule { 'dsa-bugs-search':
+ description => 'port 1978 for bugs-search from bug web frontends',
+ rule => '&SERVICE_RANGE(tcp, 1978, ( 140.211.166.26 206.12.19.140 ))'
}
- @ferm::rule { 'dsa-routing':
- description => 'forward chain',
- chain => 'FORWARD',
- rule => 'policy ACCEPT;
-mod state state (ESTABLISHED RELATED) ACCEPT;
-interface tun+ ACCEPT;
-REJECT reject-with icmp-admin-prohibited
-'
+ }
+ default: {}
+ }
+
+ # redirect snapshot into varnish
+ case $::hostname {
+ sibelius: {
+ @ferm::rule { 'dsa-snapshot-varnish':
+ rule => '&SERVICE(tcp, 6081)',
}
- @ferm::rule { 'dsa-vpn-mark':
- table => 'mangle',
+ @ferm::rule { 'dsa-nat-snapshot-varnish':
+ table => 'nat',
chain => 'PREROUTING',
- rule => 'interface tun+ MARK set-mark 1',
+ rule => 'proto tcp daddr 193.62.202.30 dport 80 REDIRECT to-ports 6081',
}
- @ferm::rule { 'dsa-vpn-nat':
+ }
+ lw07: {
+ @ferm::rule { 'dsa-snapshot-varnish':
+ rule => '&SERVICE(tcp, 6081)',
+ }
+ @ferm::rule { 'dsa-nat-snapshot-varnish':
table => 'nat',
- chain => 'POSTROUTING',
- rule => 'outerface !tun+ mod mark mark 1 MASQUERADE',
+ chain => 'PREROUTING',
+ rule => 'proto tcp daddr 185.17.185.185 dport 80 REDIRECT to-ports 6081',
}
}
- cilea: {
- ferm::module { 'nf_conntrack_sip': }
- ferm::module { 'nf_conntrack_h323': }
-
- @ferm::rule { 'dsa-sip':
- domain => '(ip ip6)',
- description => 'Allow sip access',
- rule => '&TCP_UDP_SERVICE(5060)'
+ default: {}
+ }
+ case $::hostname {
+ bm-bl1,bm-bl2: {
+ @ferm::rule { 'dsa-vrrp':
+ rule => 'proto vrrp daddr 224.0.0.18 jump ACCEPT',
}
- @ferm::rule { 'dsa-sipx':
- domain => '(ip ip6)',
- description => 'Allow sipx access',
- rule => '&TCP_UDP_SERVICE(5080)'
+ @ferm::rule { 'dsa-conntrackd':
+ rule => 'interface vlan2 daddr 225.0.0.50 jump ACCEPT',
}
- }
- unger: {
- @ferm::rule { 'dsa-notrack-dns-diamond-in':
+ @ferm::rule { 'dsa-bind-notrack-in':
domain => 'ip',
description => 'NOTRACK for nameserver traffic',
table => 'raw',
chain => 'PREROUTING',
- rule => 'destination 82.195.75.108 proto (tcp udp) dport 53 jump NOTRACK'
+ rule => 'proto (tcp udp) daddr 5.153.231.24 dport 53 jump NOTRACK'
}
- @ferm::rule { 'dsa-notrack-dns-diamond-out':
+
+ @ferm::rule { 'dsa-bind-notrack-out':
domain => 'ip',
description => 'NOTRACK for nameserver traffic',
table => 'raw',
+ chain => 'OUTPUT',
+ rule => 'proto (tcp udp) saddr 5.153.231.24 sport 53 jump NOTRACK'
+ }
+
+ @ferm::rule { 'dsa-bind-notrack-in6':
+ domain => 'ip6',
+ description => 'NOTRACK for nameserver traffic',
+ table => 'raw',
chain => 'PREROUTING',
- rule => 'source 82.195.75.108 proto (tcp udp) sport 53 jump NOTRACK'
+ rule => 'proto (tcp udp) daddr 2001:41c8:1000:21::21:24 dport 53 jump NOTRACK'
+ }
+
+ @ferm::rule { 'dsa-bind-notrack-out6':
+ domain => 'ip6',
+ description => 'NOTRACK for nameserver traffic',
+ table => 'raw',
+ chain => 'OUTPUT',
+ rule => 'proto (tcp udp) saddr 2001:41c8:1000:21::21:24 sport 53 jump NOTRACK'
}
}
default: {}
}
- if $::hostname in [rautavaara,luchesi] {
- @ferm::rule { 'dsa-to-kfreebsd':
- description => 'Traffic routed to kfreebsd hosts',
- chain => 'to-kfreebsd',
- rule => 'proto icmp ACCEPT;
-source ($FREEBSD_SSH_ACCESS $HOST_NAGIOS_V4) proto tcp dport 22 ACCEPT;
-source ($HOST_MAILRELAY_V4 $HOST_NAGIOS_V4) proto tcp dport 25 ACCEPT;
-source ($HOST_MUNIN_V4 $HOST_NAGIOS_V4) proto tcp dport 4949 ACCEPT;
-source ($HOST_NAGIOS_V4) proto tcp dport 5666 ACCEPT;
-source ($HOST_NAGIOS_V4) proto udp dport ntp ACCEPT
-'
- }
- @ferm::rule { 'dsa-from-kfreebsd':
- description => 'Traffic routed from kfreebsd vlan/bridge',
- chain => 'from-kfreebsd',
- rule => 'proto icmp ACCEPT;
-proto tcp dport (21 22 80 53 443) ACCEPT;
-proto udp dport (53 123) ACCEPT;
-proto tcp dport 8140 daddr 82.195.75.104 ACCEPT; # puppethost
-proto tcp dport 5140 daddr (82.195.75.99 206.12.19.121) ACCEPT; # loghost
-proto tcp dport 11371 daddr 82.195.75.107 ACCEPT; # keyring host
-proto tcp dport (25 submission) daddr ($HOST_MAILRELAY_V4) ACCEPT
-'
+ # elasticsearch stuff
+ case $::hostname {
+ stockhausen: {
+ @ferm::rule { 'dsa-elasticsearch-bendel':
+ domain => '(ip)',
+ description => 'Allow elasticsearch access from bendel',
+ rule => '&SERVICE_RANGE(tcp, 9200:9300, ( 82.195.75.100/32 ))'
+ }
+ @ferm::rule { 'dsa-elasticsearch-bendel6':
+ domain => '(ip6)',
+ description => 'Allow elasticsearch access from bendel',
+ rule => '&SERVICE_RANGE(tcp, 9200:9300, ( 2001:41b8:202:deb:216:36ff:fe40:4002/128 ))'
+ }
}
}
+
+ # postgres stuff
case $::hostname {
- rautavaara: {
- @ferm::rule { 'dsa-routing':
- description => 'forward chain',
- chain => 'FORWARD',
- rule => 'def $ADDRESS_FASCH=194.177.211.201;
-def $ADDRESS_FIELD=194.177.211.210;
-def $FREEBSD_HOSTS=($ADDRESS_FASCH $ADDRESS_FIELD);
+ ullmann: {
+ @ferm::rule { 'dsa-postgres-udd':
+ description => 'Allow postgress access',
+ # quantz, moszumanska, master, coccia, franck
+ rule => '&SERVICE_RANGE(tcp, 5452, ( 5.153.231.28/32 5.153.231.21/32 82.195.75.110/32 5.153.231.11/32 138.16.160.12/32 ))'
+ }
+ @ferm::rule { 'dsa-postgres-udd6':
+ domain => '(ip6)',
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5452, ( 2001:41c8:1000:21::21:28/128 2001:41b8:202:deb:216:36ff:fe40:4001/128 2001:41c8:1000:21::21:11/32 2001:41c8:1000:21::21:21/128 ))'
+ }
+ }
+ franck: {
+ @ferm::rule { 'dsa-postgres-franck':
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5433, ( 5.153.231.10/32 ))'
+ }
+ @ferm::rule { 'dsa-postgres-franck6':
+ domain => 'ip6',
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5433, ( 2001:41c8:1000:21::21:10/128 ))'
+ }
-policy ACCEPT;
-mod state state (ESTABLISHED RELATED) ACCEPT;
-interface vlan11 outerface eth0 jump from-kfreebsd;
-interface eth0 destination ($FREEBSD_HOSTS) jump to-kfreebsd;
-ULOG ulog-prefix "REJECT FORWARD: ";
-REJECT reject-with icmp-admin-prohibited
-'
+ @ferm::rule { 'dsa-postgres-backup':
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5433, ( $HOST_PGBACKUPHOST_V4 ))'
+ }
+ @ferm::rule { 'dsa-postgres-backup6':
+ domain => 'ip6',
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5433, ( $HOST_PGBACKUPHOST_V6 ))'
}
}
- luchesi: {
- @ferm::rule { 'dsa-routing':
- description => 'forward chain',
- chain => 'FORWARD',
- rule => 'def $ADDRESS_FANO=206.12.19.110;
-def $ADDRESS_FINZI=206.12.19.111;
-def $ADDRESS_FISCHER=206.12.19.112;
-def $ADDRESS_FALLA=206.12.19.117;
-def $FREEBSD_HOSTS=($ADDRESS_FANO $ADDRESS_FINZI $ADDRESS_FISCHER $ADDRESS_FALLA);
+ bmdb1: {
+ @ferm::rule { 'dsa-postgres-main':
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5435, ( 5.153.231.23/32 5.153.231.25/32 206.12.19.141/32 5.153.231.26/32 5.153.231.18/32 5.153.231.28/32 5.153.231.249/32 5.153.231.29/32 5.153.231.43/32 ))'
+ }
+ @ferm::rule { 'dsa-postgres-main6':
+ domain => 'ip6',
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5435, ( 2001:41c8:1000:21::21:23/128 2001:41c8:1000:21::21:25/128 2607:f8f0:610:4000:6564:a62:ce0c:138d/128 2001:41c8:1000:21::21:26/128 2001:41c8:1000:21::21:18/128 2001:41c8:1000:21::21:28/128 2001:41c8:1000:20::20:249/128 2001:41c8:1000:21::21:29/128 2001:41c8:1000:21::21:43/128 ))'
+ }
+ @ferm::rule { 'dsa-postgres-dak':
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5434, ( 5.153.231.11/32 5.153.231.28/32 206.12.19.123/32 5.153.231.21/32 5.153.231.18/32 ))'
+ }
+ @ferm::rule { 'dsa-postgres-dak6':
+ domain => 'ip6',
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5434, ( 2001:41c8:1000:21::21:11/128 2001:41c8:1000:21::21:28/128 2607:f8f0:610:4000:216:36ff:fe40:3861/128 2001:41c8:1000:21::21:21/128 2001:41c8:1000:21::21:18/128 ))'
+ }
+ @ferm::rule { 'dsa-postgres-wannabuild':
+ # wuiet, ullmann, franck
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5436, ( 5.153.231.18/32 206.12.19.141/32 138.16.160.12/32 ))'
+ }
+ @ferm::rule { 'dsa-postgres-wannabuild6':
+ domain => 'ip6',
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5436, ( 2001:41c8:1000:21::21:18/128 2607:f8f0:610:4000:6564:a62:ce0c:138d/128 ))'
+ }
+ @ferm::rule { 'dsa-postgres-wannabuild-ports':
+ # portman
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5436, ( 5.153.231.29/32 ))'
+ }
+ @ferm::rule { 'dsa-postgres-wannabuild-ports6':
+ domain => 'ip6',
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5436, ( 2001:41c8:1000:21::21:29/128 ))'
+ }
+ @ferm::rule { 'dsa-postgres-bacula':
+ # dinis
+ description => 'Allow postgress access1',
+ rule => '&SERVICE_RANGE(tcp, 5437, ( 5.153.231.19/32 ))'
+ }
+ @ferm::rule { 'dsa-postgres-bacula6':
+ domain => 'ip6',
+ description => 'Allow postgress access1',
+ rule => '&SERVICE_RANGE(tcp, 5437, ( 2001:41c8:1000:21::21:19/128 ))'
+ }
-policy ACCEPT;
-mod state state (ESTABLISHED RELATED) ACCEPT;
-interface br0 outerface br0 ACCEPT;
-interface br1 outerface br1 ACCEPT;
+ @ferm::rule { 'dsa-postgres-backup':
+ # ubc, wuit
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, (5435 5436), ( $HOST_PGBACKUPHOST_V4 ))'
+ }
+ @ferm::rule { 'dsa-postgres-backup6':
+ domain => 'ip6',
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, (5435 5436), ( $HOST_PGBACKUPHOST_V6 ))'
+ }
-interface br2 outerface br0 jump from-kfreebsd;
-interface br0 destination ($ADDRESS_FISCHER $ADDRESS_FALLA) proto tcp dport 22 ACCEPT;
-interface br0 destination ($FREEBSD_HOSTS) jump to-kfreebsd;
-ULOG ulog-prefix "REJECT FORWARD: ";
-REJECT reject-with icmp-admin-prohibited
-'
+ @ferm::rule { 'dsa-postgres-dedup':
+ # ubc, wuit
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, (5439), ( 5.153.231.17/32 ))'
+ }
+ @ferm::rule { 'dsa-postgres-dedup6':
+ domain => 'ip6',
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, (5439), ( 2001:41c8:1000:21::21:17/128 ))'
+ }
+
+ @ferm::rule { 'dsa-postgres-debsources':
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, (5440), ( 5.153.231.38/32 ))'
+ }
+ @ferm::rule { 'dsa-postgres-debsources6':
+ domain => 'ip6',
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, (5440), ( 2001:41c8:1000:21::21:38/128 ))'
}
}
- default: {}
- }
+ danzi: {
+ @ferm::rule { 'dsa-postgres-danzi':
+ # ubc, wuit
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5433, ( 206.12.19.0/24 5.153.231.18/32 ))'
+ }
+ @ferm::rule { 'dsa-postgres-danzi6':
+ domain => 'ip6',
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5433, ( 2607:f8f0:610:4000::/64 2001:41c8:1000:21::21:18/128 ))'
+ }
- # redirect snapshot into varnish
- case $::hostname {
+ @ferm::rule { 'dsa-postgres2-danzi':
+ description => 'Allow postgress access2',
+ rule => '&SERVICE_RANGE(tcp, 5437, ( 206.12.19.0/24 ))'
+ }
+ @ferm::rule { 'dsa-postgres3-danzi':
+ description => 'Allow postgress access3',
+ rule => '&SERVICE_RANGE(tcp, 5436, ( 206.12.19.0/24 ))'
+ }
+ @ferm::rule { 'dsa-postgres4-danzi':
+ description => 'Allow postgress access4',
+ rule => '&SERVICE_RANGE(tcp, 5438, ( 206.12.19.0/24 ))'
+ }
+
+ @ferm::rule { 'dsa-postgres-backup':
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5433, ( $HOST_PGBACKUPHOST_V4 ))'
+ }
+ @ferm::rule { 'dsa-postgres-backup6':
+ domain => 'ip6',
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5433, ( $HOST_PGBACKUPHOST_V6 ))'
+ }
+ }
+ seger: {
+ @ferm::rule { 'dsa-postgres-backup':
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5432, ( $HOST_PGBACKUPHOST_V4 ))'
+ }
+ @ferm::rule { 'dsa-postgres-backup6':
+ domain => 'ip6',
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5432, ( $HOST_PGBACKUPHOST_V6 ))'
+ }
+ }
sibelius: {
- @ferm::rule { 'dsa-snapshot-varnish':
- rule => '&SERVICE(tcp, 6081)',
+ @ferm::rule { 'dsa-postgres-backup':
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5433, ( $HOST_PGBACKUPHOST_V4 ))'
}
- @ferm::rule { 'dsa-nat-snapshot-varnish':
- table => 'nat',
- chain => 'PREROUTING',
- rule => 'proto tcp daddr 193.62.202.30 dport 80 REDIRECT to-ports 6081',
+ @ferm::rule { 'dsa-postgres-backup6':
+ domain => 'ip6',
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5433, ( $HOST_PGBACKUPHOST_V6 ))'
+ }
+ @ferm::rule { 'dsa-postgres-replication':
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5433, ( 185.17.185.187/32 ))'
+ }
+ @ferm::rule { 'dsa-postgres-replication6':
+ domain => 'ip6',
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5433, ( 2001:1af8:4020:b030:deb::187/128 ))'
}
}
- stabile: {
- @ferm::rule { 'dsa-snapshot-varnish':
- rule => '&SERVICE(tcp, 6081)',
+ lw07: {
+ @ferm::rule { 'dsa-postgres-snapshot':
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5439, ( 185.17.185.176/28 ))'
}
- @ferm::rule { 'dsa-nat-snapshot-varnish':
- table => 'nat',
- chain => 'PREROUTING',
- rule => 'proto tcp daddr 206.12.19.150 dport 80 REDIRECT to-ports 6081',
+ @ferm::rule { 'dsa-postgres-snapshot6':
+ domain => 'ip6',
+ description => 'Allow postgress access',
+ rule => '&SERVICE_RANGE(tcp, 5439, ( 2001:1af8:4020:b030::/64 ))'
}
}
default: {}
}
+ # vpn fu
case $::hostname {
- bm-bl1,bm-bl2: {
- @ferm::rule { 'dsa-vrrp':
- rule => 'proto vrrp daddr 224.0.0.18 jump ACCEPT',
+ draghi: {
+ @ferm::rule { 'dsa-vpn':
+ description => 'Allow openvpn access',
+ rule => '&SERVICE(udp, 17257)'
}
- @ferm::rule { 'dsa-conntrackd':
- rule => 'interface vlan2 daddr 225.0.0.50 jump ACCEPT',
+ @ferm::rule { 'dsa-routing':
+ description => 'forward chain',
+ chain => 'FORWARD',
+ rule => 'policy ACCEPT;
+mod state state (ESTABLISHED RELATED) ACCEPT;
+interface tun+ ACCEPT;
+REJECT reject-with icmp-admin-prohibited
+'
+ }
+ @ferm::rule { 'dsa-vpn-mark':
+ table => 'mangle',
+ chain => 'PREROUTING',
+ rule => 'interface tun+ MARK set-mark 1',
+ }
+ @ferm::rule { 'dsa-vpn-nat':
+ table => 'nat',
+ chain => 'POSTROUTING',
+ rule => 'outerface !tun+ mod mark mark 1 MASQUERADE',
}
}
default: {}
}
+ # tftp
case $::hostname {
- bm-bl1,bm-bl2,bm-bl3,bm-bl4,bm-bl5,bm-bl6,bm-bl7,bm-bl8,bm-bl9,bm-bl10,bm-bl11,bm-bl12,bm-bl13,bm-bl14: {
- @ferm::rule { 'dsa-hwnet-vlan20':
- rule => 'interface vlan20 jump ACCEPT',
+ abel: {
+ @ferm::rule { 'dsa-tftp':
+ description => 'Allow tftp access',
+ rule => '&SERVICE_RANGE(udp, 69, ( 172.28.17.0/24 ))'
+ }
+ }
+ jenko: {
+ @ferm::rule { 'dsa-tftp':
+ description => 'Allow tftp access',
+ rule => '&SERVICE_RANGE(udp, 69, ( 192.168.2.0/24 206.12.19.0/24 ))'
+ }
+ }
+ master: {
+ @ferm::rule { 'dsa-tftp':
+ description => 'Allow tftp access',
+ rule => '&SERVICE_RANGE(udp, 69, ( 82.195.75.64/26 192.168.43.0/24 ))'
}
}
- default: {}
}
}