<div><div dir="auto">Thanks for the research and modification </div></div><div dir="auto"><br></div><div dir="auto"><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue 30 Apr 2019 at 03:55, Kimberlee Integer Model <<a href="mailto:kimee.i.model@gmail.com">kimee.i.model@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thibaut, I did a little more reading, and according to both<br>
firewalld.service(5) and <a href="http://firewalld.org" rel="noreferrer" target="_blank">firewalld.org</a> the service XML files, can only<br>
handle source/destination/port, and cannot handle the actions to be<br>
performed. I will update where possible to use the service files, but<br>
log/accept limit will still need to be encoded in rich rules.<br>
<br>
-- Kimee<br>
<br>
On Mon, 2019-04-29 at 20:43 -0400, Kimberlee Integer Model wrote:<br>
> Ah. I understand now. I was considering roughly the same, but wasn't<br>
> sure whether that or rich rules was preferable.<br>
> <br>
> -- Kimee<br>
> <br>
> <br>
> On Sat, 2019-04-27 at 01:39 +0200, Thibaut Perrin wrote:<br>
> > No, I think the rules you created might have a better place in a<br>
> > custom xml file instead of being given to firewall cmd directly :)<br>
> > <br>
> > On Fri, 26 Apr 2019 at 23:01, Kimberlee Integer Model <<br>
> > <a href="mailto:kimee.i.model@gmail.com" target="_blank">kimee.i.model@gmail.com</a>> wrote:<br>
> > > I'm not sure I follow, you just think the modified one should be<br>
> > > called<br>
> > > "ssh-custom", or you think there shouldn't be a modified service<br>
> > > file<br>
> > > at all?<br>
> > > <br>
> > > -- Kimee<br>
> > > <br>
> > > On Fri, 2019-04-26 at 19:46 +0200, Thibaut Perrin wrote:<br>
> > > > Hi there,<br>
> > > > <br>
> > > > Wouldn't that be a better solution to create a custom xml file<br>
> > > > to<br>
> > > <br>
> > > put<br>
> > > > in /etc/firewalld and load that "ssh-custom" service instead ?<br>
> > > > <br>
> > > > Thanks<br>
> > > > <br>
> > > > On 26/04/2019, Kimberlee Integer Model <<a href="mailto:kimee.i.model@gmail.com" target="_blank">kimee.i.model@gmail.com</a><br>
> > > > ><br>
> > > > wrote:<br>
> > > > > Thank you, I've gone in and made the listed changes changed<br>
> > > > > firewalld<br>
> > > > > sections to use services instead of just port numbers.<br>
> > > > > <br>
> > > > > -- Kimee<br>
> > > > > <br>
> > > > > <br>
> > > > > On Wed, 2019-04-24 at 17:05 -0700, Akemi Yagi wrote:<br>
> > > > > > On Wed, Apr 24, 2019 at 12:13 AM Kimberlee Integer Model<br>
> > > > > > <<a href="mailto:kimee.i.model@gmail.com" target="_blank">kimee.i.model@gmail.com</a>> wrote:<br>
> > > > > > > <br>
> > > > > > > HI all,<br>
> > > > > > > <br>
> > > > > > > 1st time contributor here. I was using the guide on<br>
> > > <br>
> > > securing<br>
> > > > > > > SSH,<br>
> > > > > > > and<br>
> > > > > > > noticed that the firewall-cmd snippets for filtering by<br>
> > > > > > > requests<br>
> > > > > > > per<br>
> > > > > > > time seem somewhat outdated. From what I can tell the<br>
> > > > > > > given<br>
> > > > > > > snippets,<br>
> > > > > > > relay arguments directly down to iptables, and do not<br>
> > > > > > > cover<br>
> > > > > > > both<br>
> > > > > > > IPv4<br>
> > > > > > > and v6. (and in fact when attempting to extend to v6 the<br>
> > > > > > > firewall<br>
> > > > > > > would<br>
> > > > > > > fail to reload). I came up with an "all firewall-cmd"<br>
> > > <br>
> > > solution<br>
> > > > > > > which<br>
> > > > > > > I'd like to share.<br>
> > > > > > > <br>
> > > > > > > It boils down to using rich rules in firewalld instead of<br>
> > > > > > > direct<br>
> > > > > > > rules<br>
> > > > > > > for iptables. The code snippets in section 6 of <<br>
> > > > > > > <a href="https://wiki.centos.org/HowTos/Network/SecuringSSH" rel="noreferrer" target="_blank">https://wiki.centos.org/HowTos/Network/SecuringSSH</a>>;;;;<br>
> > > <br>
> > > would be<br>
> > > > > > > changed to<br>
> > > > > > > <br>
> > > > > > > firewall-cmd --permanent --add-rich-rule='rule port<br>
> > > <br>
> > > port="22"<br>
> > > > > > > protocol="tcp" accept limit value="4/m"'<br>
> > > > > > > firewall-cmd --permanent --remove-service ssh<br>
> > > > > > > firewall-cmd --permanent --remove-port 22/tcp<br>
> > > > > > > firewall-cmd --reload<br>
> > > > > > > <br>
> > > > > > > newly minted wiki username is "KimeeModel".<br>
> > > > > > > <br>
> > > > > > > Regards,<br>
> > > > > > > Kimee<br>
> > > > > > <br>
> > > > > > You should be able to edit that page. Let us know if you<br>
> > > > > > find<br>
> > > <br>
> > > any<br>
> > > > > > problem.<br>
> > > > > > <br>
> > > > > > Akemi<br>
> > > > > > _______________________________________________<br>
> > > > > > CentOS-docs mailing list<br>
> > > > > > <a href="mailto:CentOS-docs@centos.org" target="_blank">CentOS-docs@centos.org</a><br>
> > > > > > <a href="https://lists.centos.org/mailman/listinfo/centos-docs" rel="noreferrer" target="_blank">https://lists.centos.org/mailman/listinfo/centos-docs</a><br>
> > > > > <br>
> > > > > _______________________________________________<br>
> > > > > CentOS-docs mailing list<br>
> > > > > <a href="mailto:CentOS-docs@centos.org" target="_blank">CentOS-docs@centos.org</a><br>
> > > > > <a href="https://lists.centos.org/mailman/listinfo/centos-docs" rel="noreferrer" target="_blank">https://lists.centos.org/mailman/listinfo/centos-docs</a><br>
> > > > > <br>
> > > > <br>
> > > > _______________________________________________<br>
> > > > CentOS-docs mailing list<br>
> > > > <a href="mailto:CentOS-docs@centos.org" target="_blank">CentOS-docs@centos.org</a><br>
> > > > <a href="https://lists.centos.org/mailman/listinfo/centos-docs" rel="noreferrer" target="_blank">https://lists.centos.org/mailman/listinfo/centos-docs</a><br>
> > > <br>
> > > _______________________________________________<br>
> > > CentOS-docs mailing list<br>
> > > <a href="mailto:CentOS-docs@centos.org" target="_blank">CentOS-docs@centos.org</a><br>
> > > <a href="https://lists.centos.org/mailman/listinfo/centos-docs" rel="noreferrer" target="_blank">https://lists.centos.org/mailman/listinfo/centos-docs</a><br>
> > <br>
> > _______________________________________________<br>
> > CentOS-docs mailing list<br>
> > <a href="mailto:CentOS-docs@centos.org" target="_blank">CentOS-docs@centos.org</a><br>
> > <a href="https://lists.centos.org/mailman/listinfo/centos-docs" rel="noreferrer" target="_blank">https://lists.centos.org/mailman/listinfo/centos-docs</a><br>
> <br>
> <br>
<br>
_______________________________________________<br>
CentOS-docs mailing list<br>
<a href="mailto:CentOS-docs@centos.org" target="_blank">CentOS-docs@centos.org</a><br>
<a href="https://lists.centos.org/mailman/listinfo/centos-docs" rel="noreferrer" target="_blank">https://lists.centos.org/mailman/listinfo/centos-docs</a><br>
</blockquote></div></div>