Commit Graph

277 Commits

Author SHA1 Message Date
Kevin Fenzi
77cee07ef0 base / iptables: fix format for releng and builder machines
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-05-06 17:26:08 -07:00
Adam Williamson
8b9778777b iptables: correct invalid syntax in nat table
This `[0:]` syntax doesn't seem to be correct. iptables 1.8.10
errors out on encountering it, saying:

invalid policy counters for chain 'PREROUTING'

this seems to be because the check was tightened between 1.8.9
and 1.8.10 to apply even when iptables is not actively restoring
the counters:
https://git.netfilter.org/iptables/commit/?id=4a2b2008fdf4df980433f99a6d8f2003f2005296

I think these are all meant to be 0:0, so let's make them that
and stop iptables choking.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-04-24 13:00:51 -07:00
Kevin Fenzi
4a6cb460ca buildvm_s390x in boston: retire
We have moved over to the rdu mainframe, drop all the bos kvm hosts.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-02-27 08:33:41 -08:00
Kevin Fenzi
334219e706 buildvm-s390x: move rest of old zvm builders to rdu and kvm
We want to move (well, really re-install) all these over on the new lpar
in rdu. This will have much higher stats and be in general faster by
both network and cpu. Hopefully all these will replace all the old
boston ones.

We may need to break these up some more into smaller vm's if the number
isn't able to keep up ok. We can adjust after things are all working.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-02-21 09:51:24 -08:00
Kevin Fenzi
1c4408ebe5 buildvm-s390x-14: move to rdu and setup as new varnish cache
Lets move this vm over to rdu, and set it up as a new varnish cache.
This way we can test 01 doing builds before moving others.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-02-20 17:38:34 -08:00
David Kirwan
7d63531b82 zabbix: ensure zabbix can communicate with releng machines
Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
2024-02-09 13:04:46 +00:00
David Kirwan
beb09a8835 zabbix: debugging iptables config
- add zabbix agent to RabbitMQ hosts

Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
2023-12-04 07:01:22 +00:00
Michal Konecny
df9d9a0d51 [IPA] Use ipa_server variable where posible
Don't use hardcoded ipa01, use ipa_server variable instead that is set in group_vars.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2023-11-29 17:29:15 +01:00
David Kirwan
369ae4f66e zabbix: Add zabbix01 production to iptable rules
Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
2023-11-28 08:54:13 +00:00
Kevin Fenzi
623c0f45bd base / iptables: rework how this blocklist works
Just rip out the parts here as they are no longer needed.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-08-15 12:41:54 -07:00
Kevin Fenzi
e524963387 iptables: fix conditional
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-08-15 12:23:08 -07:00
Kevin Fenzi
5936815f75 iptables / staging: more adjusting
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-08-15 12:18:21 -07:00
Kevin Fenzi
363af73e57 iptables / staging: fix the actual used template
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-08-15 12:11:22 -07:00
Kevin Fenzi
6ada4829fa base / iptables: simplify conditional even more to perhaps actually work
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-08-15 12:05:59 -07:00
Kevin Fenzi
fcd3e67484 base / iptables: simplify conditional to perhaps actually work
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-08-15 12:02:49 -07:00
David Kirwan
a9a14a4023 zabbix: modify db tasks zabbix_server role
error handling
Update iptables to allow access to server/agent

Signed-off-by: David Kirwan <dkirwan@redhat.com>
2023-06-30 12:00:33 +01:00
Kevin Fenzi
765363e04d base / iptables: fix protocol, use creates for commands
iptables -p is expecting all, not any.
And create a file to track when we have made the ipset.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-06-26 12:58:21 -07:00
Kevin Fenzi
679f7f6f16 iptables: clean up osbuild and add a external block set scaffolding
Setup osbuild so it only needs to exist on the specific builders in the
osbuild channel, not all builders.
Also, setup things so we can add a blocklist that will block external
subnets/ip's if we need to do so. Currently it should just be an empty
set, but we can implement it as needed/desired starting with the ips we
already were blocking on just some hosts.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-06-26 12:41:07 -07:00
Kevin Fenzi
7c6fe8c5b8 koji_builder: setup a osbuild group for osbuild channel builders
We need only these builders to have this ipset to talk to the osbuild
api. All the rest do not need it.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-06-26 12:41:07 -07:00
Kevin Fenzi
0d08f15f41 ip6tables: allow dhcp6d from aws
While we actually use SLAAC in aws, there's a dhcp6d sending out the
router advertisements, so without that the instance doesn't get an ipv6
ip and just doesn't work. With this it does.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-01-09 19:06:27 -08:00
Kevin Fenzi
6898b5b35a koji_builders: enable ipset for osbuild access in prod
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-07-28 16:47:55 -07:00
Kevin Fenzi
fbc18add50 koji_builder: make iptables rule staging only until we are sure it is working there
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-07-28 12:54:03 -07:00
Kevin Fenzi
1951c7fb1b koji_builder: first cut at a script to update osbuild api ip for builder firewalls
This is a quick, hacked up script that just runs once per minute and
updates the ip addresses for the osbuild koji plugin. The script calls
systemd's resolvectl without cache and puts the ips in a ipset. The
koji_builder firewall has a added rule to check that ipset for outgoing
connections that are allowed.

TODO: add some kind of error checking
TODO: probibly won't work on s390x builders as they can't reach the host
even with open firewalls, but should work for others.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-07-28 11:29:07 -07:00
Kevin Fenzi
7cf2d7b56a iptables / builders / staging: adjust to allow proxy01/10/101/110 in staging
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-07-26 14:22:55 -07:00
Kevin Fenzi
a9c5fa224f kojibuilder / staging: add in rules for staging builders to talk to ipa and nfs on koji01.stg
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-06-28 16:44:49 -07:00
Eddie Jennings, Jr
6ef496d56a Reconfigure IPv6
Reconfigure IPv6

Reconfigure IPv6

Reconfigure IPv6

Reconfigure IPv6

Reconfigure IPv6

Reconfigure IPv6

Reconfigure IPv6

Configure IPv6

Reconfigure IPv6

Reconfigure IPv6

Reconfigure IPv6

Reconfigure IPv6

Reconfigure IPv6

Reconfigure IPv6

Reconfigure IPv6

Reconfigure IPv6

Configure IPv6

Update IPv6 address for noc02 rule

Update IPv6 address in confg for noc02 address change

Update IPv6 address for proxy04

Update IPv6 address for torrent02
2021-11-08 22:56:05 +00:00
Kevin Fenzi
ee49c53f08 base / iptables: Adjust iptables on all vpn hosts to drop less secure traffic
Most of our vpn hosts are on a 192.168.1.0/24 network.
However we have a small number on a 'less secure' 'less trusted' subnet:
192.168.100.0/24. This change adds in logic to:
* on log01, allow rsyslog from 192.168.100.x hosts
* on ipa servers, allow ipa ports for 192.168.100.x hosts
* then reject everything else.
This will make sure 192.168.100.x hosts can only hit ssh and the two
above items, otherwise all vpn hosts will reject their traffic. This
should add a bit of security to having those hosts on the vpn.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-05-04 21:15:05 +00:00
Kevin Fenzi
6a2bff7af9 base / ifcfg: make sure and set staging to use stg.iad2.fedoraproject.org domain
This should only affect stg hosts.
We had set all of iad2 the same, prod and stg both.
We need to make sure stg resolves to stg hosts first.
This worked somewhat until now because we replace the resolv.conf on stg
hosts, but without this they are borken right after boot and until we
replace the resolv.conf and restart httpd or other services.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-04-21 12:13:06 -07:00
Kevin Fenzi
fc2db16120 iptables / kojibuilder: add some more ports needed by ipa-clients
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-03-29 15:20:00 -07:00
Kevin Fenzi
6bf8552e7f base / iptables / kojibuilder: add ipa ports for koji builder ipa clients
Note that this will not yet work, it needs the RHIT firewall between
vlans opened on these ports first, but after that this is needed to
allow them to use those ports.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-03-25 10:10:55 -07:00
Kevin Fenzi
55cc28c3b1 base / iptables: Add rules to block staging networks on prod hosts
In IAD2 the prod and stg hosts are on different VLANs, so we thought we
didn't need this. However, we are still seeing some odd mixing of prod
and stg fedmsgs, so likely some fedmsg port has become enabled accross
all the VLANS. In any case this should do no harm, it just adds 2
subnets on all prod hosts to block staging, except for a small number of
staging_friendly hosts (in the staging_friendly ansible group).

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-03-19 20:08:05 +00:00
Kevin Fenzi
e5606578de base: try changing f33 crypto-policies to a less open version to get 2fa working
LEGACY allows all kinds of old junk, lets try and just
enable the things that FEDORA32 allowed.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-11-03 14:10:39 -08:00
Kevin Fenzi
4e63bbb7b2 Add a crypto-policies to set to LEGACY on fedora 33 hosts
This is needed to get our 2fa working.
We should drop this once we are moved to sssd.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-10-29 10:17:04 -07:00
Aurélien Bompard
fa6eaf9f42 get rid of phx2 in krb5.conf
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2020-10-07 14:14:06 +02:00
Kevin Fenzi
71d475085b iptables / koji_builder: update ip address for pagure.io
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-10-01 16:55:00 -07:00
Stephen Smoogen
8d58708305 remove 10.5.126 ips from nrpe to try and figure out why host was not connecting 2020-09-23 17:08:17 -04:00
Stephen Smoogen
fede1317e7 proxy*.stg.iad2.fedoraproject.org is not on the vpn 2020-08-31 11:09:14 -04:00
Kevin Fenzi
c96131045d base / iptables / kojibuilder: allow port 80 on new s390x cache instance
Moving the local to s390x cache from 07 (a zvm instance) to 24 (a kvm
instance) needs to adjust the firewalls for those builders to know that
they can use port 80 on the new one. After that we will update dns to
point it to the new location.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-08-03 12:40:54 -07:00
Kevin Fenzi
e1d77f58d6 base / iptables / staging: drop nat section in iptables
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-07-18 16:25:45 -07:00
Stephen Smoogen
f615527d42 remove the template sync. It will not work because most logs need to be done over vpn which the ansible inventory does not know 2020-07-10 09:29:41 -04:00
Stephen Smoogen
fdf96ef734 fix bug in syncHttpLogs causing them to fail 2020-07-10 09:29:41 -04:00
Kevin Fenzi
a02d9a2da0 base / iptables / koji_builder: The s390x hosts need to talk to kojipkgs01/02
Actually it's only the varnish caching host that needs to talk to them
at this point, but might as well allow it on any of them in case we
switch how the caching works there or the like.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-07-06 10:38:44 -07:00
Kevin Fenzi
4857a1f032 iptables: drop kojibuilder_iad2 in favor of kojibuilder, add tang access
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-07-01 14:04:55 -07:00
Kevin Fenzi
5a7245bf26 iptables / nagios_client/server: clean up more phx2 ips for iad2
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-06-30 14:51:43 -07:00
Kevin Fenzi
f8c4957c95 iptables: adjust for new noc01 ip, drop some iptables files no longer used.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-06-30 14:24:09 -07:00
Stephen Smoogen
f7a2b66c56 ok back off various changes to the templates 2020-06-26 18:15:21 -04:00
Stephen Smoogen
305bd6af2f fix the ipv4_gw issue 2020-06-26 18:12:31 -04:00
Stephen Smoogen
f73b4ce9ca some networks will have multiple gateways 2020-06-26 17:59:29 -04:00
Stephen Smoogen
2e31f43080 do not mix bash fi and jinja endif 2020-06-26 17:56:23 -04:00
Stephen Smoogen
414dabc9b9 Try to hack it so builders and other multi eth boxes can have interfaces off easily until a real replacement is done. 2020-06-26 17:53:56 -04:00