Commit Graph

348 Commits

Author SHA1 Message Date
Kevin Fenzi
0fb53e0fba base: only compress logs on log01, not everything
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-06-27 08:31:31 -07:00
Kevin Fenzi
e06db2465a base / iptables: fix last conditional
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-06-26 13:27:06 -07:00
Kevin Fenzi
f1eaa5d773 base / iptables: simplify logic
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-06-26 13:23:38 -07:00
Kevin Fenzi
03abad159d base / iptables: one more typo
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-06-26 13:04:43 -07:00
Kevin Fenzi
c5773c8c45 base / iptables: fix some syntax issues
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-06-26 13:04:15 -07: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
fbe288a422 base / iptables: adjust conditional to not depend on datacenter for non iad2 hosts
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-06-26 12:52:25 -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
Seddik Alaoui Ismaili
b79003cfda compress merged logs under /var/log/hosts 2023-06-22 20:50:46 +00:00
Pavel Raiskup
bee7b64fe5 main.cf files need to be moved before we claim they are templates
Revert "postfix: install main.cf as template"

This reverts commit 57f75cbcab.
2023-06-19 10:39:39 +02:00
Pavel Raiskup
57f75cbcab postfix: install main.cf as template
There is no jinja in the current main.cf files, except for the Copr
main.cf that uses STARTTLS for SMTP relayhost.
2023-06-19 10:33:33 +02:00
Pavel Raiskup
82205131b7 smtp_auth_relay: new role, use by copr-dist-git-dev for now 2023-06-19 10:10:43 +02:00
Kevin Fenzi
afb783d989 log01 / rsyslog: install the ca cert and use it in the file
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-05-04 11:36:56 -07:00
Seddik Alaoui Ismaili
a1e6a14e17 log forward to splunk 2023-05-04 09:03:57 +00:00
Kevin Fenzi
ecce8cc965 crypto-policies: Set ns01.iad2/ns02.iad2 to use DEFAULT:SHA1 crypto-policy
ns01 and ns02 are used by internal iad2 ssytems for dns resolution.
This means bastion uses them for smtp outgoing at least.
Lots of dnssec servers out there still are using SHA1 signatures, and
without this the hosts will simply not resolve at all.
So, until things are better we need to set these back to allow SHA1.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-02-02 17:42:15 -08:00
Kevin Fenzi
f46beef7ac base: update list of build machines
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-12-05 16:35:48 -08:00
Kevin Fenzi
8cfa0a2a0b base: you cannot redirect in a command
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-08-01 12:34:38 -07:00
Kevin Fenzi
08ccdd41fc base: make sure we install and setup ipset for builders
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-08-01 12:31:20 -07:00
Kevin Fenzi
9ddd3e2e6d postfix / gateway: add bysender map
This is a hack to work around SPF screwing us for @fedoraproject.org
aliases. It only fixes email from @redhat.com, but due to bugzilla thats
a lot of email.

Without this:
bugzilla@redhat.com -> user@fedoraproject.org (expands) ->
user@gmail.com sent out directly to gmail and gets rejected because
we aren't in the redhat.com SPF record.

With this:

bugzilla@redhat.com -> user@fedoraproject.org (expands) ->
user@gmail.com but sent to mx2.redhat.com to deliver. Since
mx2.redhat.com definitely is in the redhat.com SPF record the email is
delivered fine and SPF checks pass.

This won't help for other domains with -all SPF records, but at least it
helps for all the redhat.com emails, of which there are a lot going to
fedoraproject.org aliases. :)

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-07-26 15:58:43 -07:00
Kevin Fenzi
a336ba2a9e postfix: use a chain file for ssl certs
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-07-21 16:25:10 -07:00
Kevin Fenzi
b54b8a0bb7 bastion / postfix: adjust gateway ssl cert to base name
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-07-21 13:39:43 -07:00
Kevin Fenzi
9953c1346f postfix / also install tls_policy on pagure*
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-06-13 18:03:59 -07:00
Kevin Fenzi
92867b50a2 base / crypto-policies: move fedora instances back to DEFAULT
We changed this to DEFAULT:FEDORA32 a while back because the certs for
the old totpcgi sudo needed it to work. Now thats all gone and we are
100% on ipa and sssd, this should no longer be needed.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-06-06 14:10:20 -07:00
Kevin Fenzi
17959a301c base: no more docker anywhere, drop this
We aren't using docker anywhere anymore, so we don't need to uselessly
try and restart it all the time.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-06-02 15:14:54 -07:00
Kevin Fenzi
caf5f130c8 bastion / postfix: clean up tls_policy duplicates
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-05-24 12:33:26 -07:00
Kevin Fenzi
a1af68173d bastion / postfix: disable tls_resue for now
Something is broken with smtp_tls_connection_reuse = yes, so disable it
for now. Also, setup a tls_policy map file and tell it to not use tls
for mx2.redhat.com. The normal smtp connection reuse works just fine, so
this will keep mail flowing until we can one day figure out why tls
connection reuse is busted.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-05-24 12:24:30 -07:00
Kevin Fenzi
6d3114e3bd base / postfix / bastion/gateway: fix up email flow to @redhat.com
Recently, redhat.com changed internal MX servers. The new servers are
have rate limits on incoming emails from one ip and admins there don't
want to add a bunch of exceptions, so we need to adjust our end to not
flood connections to them. Currently, connections burst up to 100 (the
smtp postfix default) which goes over their limits and causes the
internal MX to reject emails from us for a while.

So, this change:

* Adds some domains to fast_flush. This allows us to use postqueue -s
  domain to flush emails to a particular domain.

* Changes the smtp limit to 40. This is under the redhat.com limit.

* Has ansible actually install the master.cf.gateway on bastion servers.
  Currently they were using the stock/default one.

* Enables the tlsproxy service, which is actually needed to get that tls
  reuse working.

After these changes, we keep few connections to the redhat.com mx open,
but we reuse them and send more emails over existing connections. No
'too many connection emails' have happened since the changes.
The queue slowly seems to be processing down.

Since this was causing an outage of email, I have already applied these
things to bastion01, but I'd like to make sure we match up to whats in
ansible.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-04-24 16:59:35 +00:00
Kevin Fenzi
eb991fa9c1 base / big network cleanup
Everything should now be using linux-system-roles/network, so we drop
our hacky nmcli calls and everything that referred to them, including
exclude variables. Also, lets just let NM handle resolv.conf so it's not
wrong all the time on reboots.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-01-26 12:14:23 -08:00
Pavel Raiskup
408a990a24 base: try s/dnf/package/ module
TASK [base : Ensure iptables is installed] ************************************
Wednesday 05 January 2022  10:49:01 +0000 (0:00:00.251)       0:01:17.816 *****
Wednesday 05 January 2022  10:49:01 +0000 (0:00:00.251)       0:01:17.815 *****
fatal: [noc02.fedoraproject.org]: FAILED! => {"changed": false, "cmd":
"dnf install -y python2-dnf", "msg": "[Errno 2] No such file or directory", "rc": 2}
2022-01-05 13:03:37 +01:00
Mark O Brien
148f8307d7 base: ensure iptables is installed
Signed-off-by: Mark O Brien <markobri@redhat.com>
2021-12-21 17:06:32 +00:00
Nils Philippsen
c782eceae1 Move syncHttpLogs.sh into web-data-analysis role
Signed-off-by: Nils Philippsen <nils@redhat.com>
2021-07-23 13:06:23 +02:00
Kevin Fenzi
5d6f460b42 buildvm_s390x: the z/vm s390x instances use enc900 as network interface
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-07-07 13:43:22 -07:00
Kevin Fenzi
ad91eae586 base: adjust grouping to give the desired result in when for NM tweaking
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-07-07 12:56:46 -07:00
Stephen Smoogen
ec8c05f116 Fix tasks/postfix.yaml and roles/basic/tasks/postfix.yaml to match
Found the reason that the definitions I had put were not
working. There were two different ones and i was looking at the wrong
one. Put the two tasks with the same logic so things should work no
matter which one is run.
2021-02-17 19:17:50 -05:00
Aurélien Bompard
00e8e4eb25 Don't get a keytab on IPA itself
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2021-02-11 12:34:22 +01:00
Kevin Fenzi
acbf9e21f7 base / crypto-policy: always run, even in check mode
We need to always run these even in check mode, because they register
things used in the last one of them. So, this could change this in check
mode if we modify it. Be careful!

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2021-02-10 15:13:19 -08:00
Mark O'Brien
8c00c6840b iptables change wasnt needed 2020-11-24 17:35:33 +00:00
Mark O'Brien
a426b0e240 no iptables on Centos 8 2020-11-24 17:26:29 +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
Adam Williamson
e14052db33 ok debug stuff did its job goodbye
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-10-30 13:14:54 -07:00
Adam Williamson
ea70d16680 gah stupid tags
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-10-30 13:12:33 -07:00
Adam Williamson
a4deb8dbaa try and fix this debug stuff why is ansible so hard
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-10-30 13:11:51 -07:00
Adam Williamson
c60897306c sigh yaml
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-10-30 13:06:42 -07:00
Adam Williamson
e02baf2149 Add a bit of debugging to crypto-policies
aka why isn't it working on a64 worker02

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-10-30 13:05:29 -07:00
Adam Williamson
fd292f9aa7 Try and fix syntax in that last commit
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-10-29 11:14:45 -07:00
Adam Williamson
bb286d8099 Enhance the crypto-policy stuff to actually set the policy
Just writing a config file isn't enough, apparently. We need to
really call update-crypto-policies. This attempts to do so, but
only if it's really necessary, by using some handy check args.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-10-29 11:12:01 -07: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
Stephen Smoogen
15348981f8 try to fix part of ticket #9273 by increasing the number of open files allowed on log servers and people as they have a large number of files to deal with. 2020-08-28 08:26:19 -04:00
Kevin Fenzi
f551e07637 base: use linux system roles network role for hosts that define network_connections
This is VASTLY better than the hack we have in base now to try and setup
ifcfg files. It uses a standard role that has lots of options and does
the right thing with NetworkManager. Ideally we would switch everything
to this, but lets try it here first to see. It should work with bridges,
etc as well.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-08-13 10:37:12 -07:00
Kevin Fenzi
7825d7664b base keytab: try and just use --force here
We made this change for other keytabs, so just do it here too.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-07-27 15:35:00 -07:00