Difference between pages "Package:Sshguard" and "Template:Ebuild"

(Difference between pages)
 
 
Line 1: Line 1:
 +
<noinclude>
 +
This is the "Ebuild" template.
 +
It should be called in the following format:
 +
<pre>
 
{{Ebuild
 
{{Ebuild
|Summary=protects hosts from brute force attacks against ssh
+
|Summary=
|CatPkg=app-admin/sshguard
+
|CatPkg=
 
|Maintainer=
 
|Maintainer=
 +
|Homepage=
 
}}
 
}}
__TOC__
+
</pre>
'''sshguard''' is an intrusion prevention system.  sshguard parses server logs, determines malicious activity, and then bans malicious users via firewall rules.  sshguard is written in C so it does not tax an interprator.
+
Edit the page to see the template text.
 
+
</noinclude><includeonly>{{#widget:AddThis}}<div class="container"><div class="row">
== Installation ==
+
<div class="col-md-3 col-md-push-9">
=== Emerge ===
+
<b>[[CatPkg::{{{CatPkg|}}}]]</b>
To install sshguard:
+
<hr>{{#vardefine:cat|{{#explode:{{{CatPkg}}}|/|0}}}}{{#vardefine:pkg|{{#explode:{{{CatPkg}}}|/|1}}}}{{#get_web_data:url=http://ports.funtoo.org/packages.xml|format=xml|use xpath|data=repo_id=/packages/category[@name='{{#var:cat}}']/package[@name='{{#var:pkg}}']/@repository}}{{#vardefine:repoid|{{#if:{{#external_value:repo_id}}|{{#external_value:repo_id}}|gentoo}}}}{{#set:RepoID={{#var:repoid}}}}
 
+
<table border="0" width="100%">
<console>
+
{{#if: {{{Maintainer|}}} |<tr><td><i>Current Maintainer(s):</i></td><td>{{#arraymaptemplate:{{{Maintainer|}}}|MaintainerDisplay|,|<br>}}</td></tr> |}}<tr><td><i>Source Repository:</i></td><td>{{#ask:[[Category:Repositories]] [[Repository ID::{{#var:repoid}}]]}}</td></tr>   {{#if: {{{Homepage|}}} |<tr><td></td><td>[[Homepage::{{{Homepage|}}}|Homepage]]</td></tr> |}}</table><hr>
###i## emerge app-admin/sshguard
+
<b>Summary:</b> [[Summary::{{{Summary|}}}]]
</console>
+
{{#get_web_data:url=http://127.0.0.1:8888/portage/meta/{{{CatPkg}}}|format=xml|use xpath|data=use=/package/@use}}{{#set:Use={{#external_value:use}}}}{{#if: {{#external_value:use}}|
 
+
== Use Flags ==
=== Configuration ===
+
{{#arraymaptemplate:{{#external_value:use}}|ExternUse|,|}}
sshguard does not have a configuration file. sshguard is controlled by flags passed to it upon execution.
+
}}
 
+
<div class="bs-head" style="text-decoration: underline; margin-bottom: 15px;">Funtoo News</div>
/etc/conf.d/sshguard is where flags & log path can be passed to the sshguard service.
+
{{NewsList|3}}
 
+
[[News|View More News...]]
==== Rules ====
+
{{file|name=/etc/conf.d/sshguard|desc=overly strict rules|body=
+
SSHGUARD_OPTS="-p 3600 -s 3600 -a 20"}}
+
 
+
==== Logs ====
+
sshguard will fail to start unless it has proper authorization logs to monitor.
+
 
+
{{file|name=/etc/conf.d/sshguard|desc=syslog-ng log location|body=
+
SSHGUARD_OPTS="${SSHGUARD_OPTS} -l /var/log/messages"}}
+
 
+
== Iptables ==
+
=== IP v4 ===
+
Generate blank iptables rules, and start iptables as outlined [[Iptables#First_Run|here]].
+
 
+
Insert these rules to allow sshguard to ban malicious users.
+
 
+
<console>
+
###i## iptables -N sshguard
+
</console>
+
 
+
&& to block all trafic from offenders
+
 
+
<console>
+
###i## iptables -A INPUT -j sshguard
+
</console>
+
 
+
== Boot Service ==
+
=== OpenRC ===
+
To start sshguard immediately:
+
<console>
+
###i## rc-service sshguard start
+
</console>
+
 
+
To start sshguard upon reboot:
+
<console>
+
###i## rc-update add sshguard default
+
</console>
+
 
+
== External Resources ==
+
*http://www.sshguard.net/
+
*http://www.ohloh.net/p/sshguard
+
  
[[Category:Security]]
+
</div><div class="col-xs-12 col-md-9 col-md-pull-3">{{DISPLAYTITLE:{{PAGENAME}}}}
[[Category:Server]]
+
<div id="ebuild_header"><div id="ebuild_logo" style="padding-bottom: 1em;">[[File:ebuild.png|link=|frameless|class=img-responsive]]</div><div id="ebuild_title">
{{EbuildFooter}}
+
= {{PAGENAME}} =
 +
</div></div>
 +
{{#seo:
 +
|title=Package: {{PAGENAME}} ({{{CatPkg}}})
 +
|keywords={{{CatPkg}}},ebuild,gentoo,funtoo
 +
|description=A Funtoo Linux ebuild for {{{CatPkg}}}: {{{Summary|}}}
 +
}}{{Tip|This is a wiki page. To edit it, {{CreateAccount}}. Then [[{{#special:userlogin}}|log in]] and then {{#formlink:form=Ebuild|link text=click here to edit this page|target={{FULLPAGENAME}}}}. See our [[Help:Funtoo_Editing_Guidelines|editing guidelines]] to becoming a wiki-editing pro.}}
 +
</includeonly>

Revision as of 17:16, January 12, 2015

This is the "Ebuild" template. It should be called in the following format:

{{Ebuild
|Summary=
|CatPkg=
|Maintainer=
|Homepage=
}}

Edit the page to see the template text.