<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}
@font-face
{font-family:"Times New Roman \(Body CS\)";
panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:12.0pt;
font-family:"Aptos",sans-serif;
mso-ligatures:standardcontextual;
mso-fareast-language:EN-US;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-GB" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">We recently migrated a Virtbiz VPS from 5209R to 5210R.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">On the 5209R we used /etc/hosts.allow and /etc/hosts.deny to stop all SSH access apart from a few trusted IP addresses.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">This is not possible in 5210R so I am looking for some ideas to achieve the same.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">I can’t use firewalld because this VPS is on Aventurin{e}.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">I have installed APF and Fail2ban but if I add any entries into the APF blacklist or whitelist they get overwritten by Fail2ban.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">I have added the following entries into the APF glob_deny.rules<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB"># Block SSH Access</span><span style="font-size:10.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB">tcp:in:d=22:s=0/0</span><span style="font-size:10.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB">and in glob_allow.rules</span><span style="font-size:10.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB"> </span><span style="font-size:10.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB">#Allow SSH</span><span style="font-size:10.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB">tcp:in:d=22:s=93.89.130.113</span><span style="font-size:10.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB">tcp:in:d=22:s=piltraque.jacoma.es<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB">That doesn’t seem to work! :-/<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB">Now out of ideas.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB">Thoughts welcome. How have others achieved this?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB">Colin</span><span style="font-size:10.0pt;color:#212121;mso-ligatures:none;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
</div>
</body>
</html>