This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a small script to block RFC invalid HELO for EXIM based on the popular linux firewall tool called CSF | |
# Exim_RFC | |
if (($globlogs{CUSTOM1_LOG}{$lgfile}) and ($line =~ /^.* H=.* \[(\S+)\]:.* rejected MAIL <.*>: Access denied - Invalid HELO name \(See RFC2821 .*\)$/)) { | |
return ("EXIM RFC Hit from",$1,"EXIMRFC","1","25;tcp,465;tcp,587;tcp","3600"); | |
} | |
# Exim_SyncIP | |
if (($globlogs{CUSTOM1_LOG}{$lgfile}) and ($line =~ /^\A\d{4}\-\d{2}\-\d{2}\s\d{2}\:\d{2}\:\d{2}\s\w{4}\s\w{8}\s\w{15}\s\w{5}\s\(\w{5}\s\w{4}\s\w{7}\s\w{7}\s\w{3}\s\w{8}\)\:\s\w{8}\s\w{10}\s\w{4}\sH\=\[(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|\S{1,255}\s\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|\S{1,4}\:\S{1,4}\:\S{1,4}\:\:\S{1,4})\]\:\d{1,5}\s\w{5}\=\".{0,514}\"$/)) { | |
return ("EXIM SYNCIP Hit from",$1,"EXIMSYNCIP","3","25;tcp,465;tcp,587;tcp","3600"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm writting this gist for anyone who is having problems updating their OVH Public Cloud hostname on CentOS 7 | |
The issue: | |
When ordering a public cloud instance and setting the instance name to sub.domain.tld and then eventually changing that sub | |
the settings don't seem to update on OVH side. | |
It looks like systemd-hostnamed still pulls the original hostname from what i'm guessing is the datastore on OpenStack. (unconfirmed) | |
The solution: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/etc/apache2/conf.d/includes/pre_main_global.conf -- contains | |
<Macro piwiklog $vhost $logname $output $env> | |
LogFormat "$vhost %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" $logname | |
CustomLog "|/home2/user/public_html/changeddomain.tld/misc/log-analytics/import_logs.py \ | |
--add-sites-new-hosts \ | |
--config=/home2/user/public_html/changeddomain.tld/config/config.ini.php \ | |
--url='https://changeddomain.tld/' \ | |
--token-auth=REMOVED \ | |
--enable-bots \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Generate uuids for clients and admins that don't have uuids set. | |
* | |
* The WHMCS 6.2.0 update process automatically inserts uuids, but if your | |
* installation bypasses WHMCS update routines then this will generate uuids for | |
* the client and admin users that don't have one yet. | |
* | |
* Warning! Please back up at least your tblclient and tbladmin tables before |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDUF6uIjRw9elKk6FBYA/KWTwHaY3kTjDkccAEVunYKzoKR0XvMAxvNlsN3qaltSi4XNKuDiXFF58sesG55U7N33IGfqWAhXFOIFRuVLY3gF0RMn15xNn+V588Kg0VJJTz2A5ebGFi8RHbE6v8nJC5MH5L4FGG8wq57uuoJCkqAHEnmX/T7Re09unXk6ER9SfUPUMAU1Rwtm/TR8GK2eUjjusIQq5/dNIzwTzfaQh36Mo0evvOvXwSRxCkT9fbGvjzGbzy+mpNmXC19VmVm3FbdeJw5/MN2wMg+l3s97cnz2q0fr9Az0Egdk9y8G8tCWxTrMQmoPo0p5LWy7+EJ+BVtu1XckC/EIRxJvND9uwmztZx6Kf6FszGsDYT6E6gLKTHeQy+3yD3s5t++bRxORCOfVa5rE5r1kw4qFCYt6AWU+dzUcICtDujj4NNlLTrrX31H8l6AzxFd+jr7po/tk9CzTy7tuqWyDsagSK2jBvNNPxyWmS0QyZ0M0GFzyvV9fn4tlf2Qj1sfGhOOIaEVY/AplkafKX1uZyKoEtQDuMcvXFRsIUJmID1SMI8GfRDuc5y62H31gWgXgzN2WWUyr292U3BxIhuV5T/o7YNUfrov3BmoRFgdef+h1ufvgDzBDRx0l8+uQAF2WwJe9Xv9eZwAqwlVgHQWGdfLLCq+fki0IQ== [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to scan for ham/spam in large diretories on CentOS 7 | |
rspamc -h 10.0.0.1:11334 -t 120 learn_ham * | |
rspamc -h 10.0.0.1:11334 -t 120 learn_spam * | |
We don't use password, because i allowed specific hosts to run admin control tools. | |
https://manpages.debian.org/testing/rspamd/rspamc.1.en.html | |
http://manpages.ubuntu.com/manpages/groovy/man1/rspamc.1.html |