about summary refs log tree commit diff stats
path: root/tools/fail2ban.html
blob: 9fad021c5387b648273ad39eaa58a41b72403bcf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPEhtml>
<htmldir="ltr" lang="en">
   <head>
       <meta charset='utf-8'>
       <title>1. Fail2ban</title>
   </head>
   <body>
       <h1>1. Fail2ban</h1>

       <pre>
       $ prt-get depinst fail2ban
       </pre>

       <h2 id="conf">1. Configure</h2>

       <p>To start fail2ban at next boot edit /etc/rc.conf and add fail2ban.
       Fail2ban will verify if /etc/fail2ban/jail.local exist, if exist will
       use it. Copy distribution jail.conf to jail.locol;</p>

       <pre>
       $ sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
       </pre>

       <p>Edit /etc/fail2ban/jail.local, example configuration;</p>

       <pre>
       [ssh-iptables]

       enabled  = enable
       filter   = sshd
       action   = iptables[name=SSH, port=ssh, protocol=tcp]
                  sendmail-whois[name=SSH, dest=admin@box, sender=fail2ban@box, sendername="fail2ban"]
                  logpath  = /var/log/auth
                  maxretry = 5
       </pre>
   </body>
</html>
ng */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# $LynxId: makefile.in,v 1.73 2014/01/19 14:41:13 tom Exp $
# template-makefile for Lynx src directory

SHELL		= @CONFIG_SHELL@
CDPATH		= .

@SET_MAKE@
prefix		= @prefix@
datarootdir	= @datarootdir@
exec_prefix	= @exec_prefix@
top_srcdir	= @top_srcdir@
srcdir		= @srcdir@
VPATH		= .:$(srcdir)

top_builddir	= ..

# see po/makefile
localedir	= @NLS_DATADIR@/locale

# Symbols which the configure script can set in each makefile:
CC		= @CC@
CPP		= @CPP@
CFLAGS		= @CFLAGS@
DEFS		= @DEFS@
CHARSET_DEFS	= @CHARSET_DEFS@
EXTRA_CPPFLAGS	= @EXTRA_CPPFLAGS@
CPPFLAGS	= @CPPFLAGS@

x		= @EXEEXT@
o		= .@OBJEXT@

BUILD_CC	= @BUILD_CC@
BUILD_CPP	= @BUILD_CPP@
BUILD_CFLAGS	= @BUILD_CFLAGS@
BUILD_CPPFLAGS	= @BUILD_CPPFLAGS@ @DEFS@
BUILD_EXEEXT	= @BUILD_EXEEXT@
BUILD_LDFLAGS	= @BUILD_LDFLAGS@
BUILD_LIBS	= @BUILD_LIBS@

MAKE_RECUR	= $(MAKE) @cf_cv_makeflags@ DESTDIR="$(DESTDIR)" CC="$(CC)"

YACC		= @YACC@
WINDRES		= @WINDRES@

LIBS		= @LIBS@ $(RESOLVLIB) $(WAISLIB) $(SITE_LIBS)
LDFLAGS		= @EXTRA_LDFLAGS@ @LDFLAGS@

# Symbols inherited from the top-level makefile
RESOLVLIB	= # FIXME: set in parent makefile
SITE_DEFS	= # FIXME: set in parent makefile
SITE_LIBS	= # FIXME: set in parent makefile
WAISLIB		= # FIXME: set in parent makefile

WWWINC		= WWW/Library/Implementation
WWWLIB		= $(top_builddir)/WWW/Library/Implementation/libwww.a

INTLLIB		= @INTLLIBS@
INTLDIR_CPPFLAGS= @INTLDIR_CPPFLAGS@-I$(top_srcdir)/intl

CPP_OPTS	= $(DEFS) $(CHARSET_DEFS) \
		-DLOCALEDIR=\"$(localedir)\" \
		-I. \
		-I$(top_builddir) \
		-Ichrtrans \
		-I$(srcdir)/chrtrans \
		-I$(top_srcdir) \
		-I$(top_srcdir)/src \
		-I$(top_srcdir)/$(WWWINC) \
		$(INTLDIR_CPPFLAGS) $(SITE_DEFS) $(EXTRA_CPPFLAGS) $(CPPFLAGS)
CC_OPTS		= $(CPP_OPTS) $(CFLAGS)

LINT		= @LINT@
LINTOPTS	=

CTAGS		= @CTAGS@

COMPRESS_PROG	=@COMPRESS_PROG@
COMPRESS_EXT	=@COMPRESS_EXT@

CHARTRANS_OBJS	= UCdomap$o UCAux$o UCAuto$o
OBJS		= \
	LYebcdic$o \
	LYClean$o LYShowInfo$o LYEdit$o LYStrings$o LYMail$o \
	HTAlert$o GridText$o LYGetFile$o LYMain$o LYMainLoop$o \
	LYCurses$o LYBookmark$o LYmktime$o LYUtils$o LYOptions$o \
	LYReadCFG$o LYSearch$o LYHistory$o LYForms$o LYPrint$o \
	LYrcFile$o LYDownload$o LYNews$o LYKeymap$o HTML$o \
	HTFWriter$o HTInit$o DefaultStyle$o LYUpload$o \
	LYLeaks$o LYexit$o LYJump$o LYList$o LYCgi$o \
	LYTraversal$o LYEditmap$o LYCharSets$o LYCharUtils$o \
	LYMap$o LYCookie$o LYStyle$o LYHash$o LYPrettySrc$o \
	TRSTable$o parsdate$o $(CHARTRANS_OBJS) @EXTRA_OBJS@ @LIBOBJS@

C_SRC		= $(OBJS:$o=.c)

all: lynx$x

.SUFFIXES : $o .i

# yacc builds .c in target directory, not $(srcdir)
.c$o:
	@RULE_CC@
	@ECHO_CC@$(CC) $(CC_OPTS) -c $<

.c.i:
	@RULE_CC@
	@ECHO_CC@$(CPP) -C $(CPP_OPTS) $< >$@

lynx$x:   message $(top_builddir)/LYHelp.h $(OBJS) $(WWWLIB)
	@echo "Linking and creating Lynx executable"
	$(CC) $(CC_OPTS) $(LDFLAGS) -o $@  $(OBJS) $(WWWLIB) $(LIBS) $(INTLLIB)
	@echo "Copying Lynx executable into top-level directory"
	rm -f $(top_builddir)/$@
	cp $@ $(top_builddir)/
	@echo "Welcome to Lynx!"

message:
	@echo "Compiling Lynx sources"

do_chartrans_stuff:
	-cd chrtrans && $(MAKE_RECUR) \
		SITE_DEFS="$(SITE_DEFS)" \
		BUILD_CFLAGS="$(BUILD_CFLAGS)" \
		BUILD_CPPFLAGS="$(BUILD_CPPFLAGS)" \
		BUILD_LDFLAGS="$(BUILD_LDFLAGS)" \
		BUILD_LIBS="$(BUILD_LIBS)" \
		BUILD_CC="$(BUILD_CC)" tables

lint:
	$(LINT) $(LINTOPTS) $(CPP_OPTS) $(C_SRC)  2>&1 |tee $(top_builddir)/lint.lynx

clean:
	rm -f lynx$x core *.core *.leaks *.i *$o *.bak tags TAGS test_*
	cd chrtrans && $(MAKE_RECUR) clean

tags:
	$(CTAGS) *.[ch]

distclean: clean

CMN=$(top_srcdir)/WWW/Library/Implementation/

HTFWriter$o :		$(top_srcdir)/userdefs.h
HTInit$o :		$(top_srcdir)/userdefs.h
LYCharSets$o :		$(top_srcdir)/userdefs.h
LYGetFile$o :		$(top_srcdir)/userdefs.h
LYKeymap$o :		$(top_srcdir)/userdefs.h
LYLeaks$o :		$(CMN)LYLeaks.h $(CMN)HTString.h
LYMail$o :		$(top_srcdir)/userdefs.h
LYMain$o :		$(top_srcdir)/userdefs.h $(top_builddir)/lynx_cfg.h
LYMainLoop$o :		$(top_srcdir)/userdefs.h
LYOptions$o :		$(top_srcdir)/userdefs.h
LYReadCFG$o :		$(top_srcdir)/userdefs.h
LYShowInfo$o :		$(top_builddir)/cfg_defs.h
LYTraversal$o :		$(top_srcdir)/userdefs.h
LYUtils$o :		$(top_srcdir)/userdefs.h
LYmktime$o :		$(top_srcdir)/userdefs.h
LYrcFile$o :		$(top_srcdir)/userdefs.h

LYIcon$o: LYIcon.rc
	$(WINDRES) -i LYIcon.rc -o LYIcon$o -O coff

CHRTR= chrtrans/

TABLES= \
 $(CHRTR)cp1250_uni.h \
 $(CHRTR)cp1251_uni.h \
 $(CHRTR)cp1252_uni.h \
 $(CHRTR)cp1253_uni.h \
 $(CHRTR)cp1255_uni.h \
 $(CHRTR)cp1256_uni.h \
 $(CHRTR)cp1257_uni.h \
 $(CHRTR)cp437_uni.h \
 $(CHRTR)cp737_uni.h \
 $(CHRTR)cp775_uni.h \
 $(CHRTR)cp850_uni.h \
 $(CHRTR)cp852_uni.h \
 $(CHRTR)cp857_uni.h \
 $(CHRTR)cp862_uni.h \
 $(CHRTR)cp864_uni.h \
 $(CHRTR)cp866_uni.h \
 $(CHRTR)cp866u_uni.h \
 $(CHRTR)cp869_uni.h \
 $(CHRTR)def7_uni.h \
 $(CHRTR)dmcs_uni.h \
 $(CHRTR)hp_uni.h \
 $(CHRTR)iso01_uni.h \
 $(CHRTR)iso02_uni.h \
 $(CHRTR)iso03_uni.h \
 $(CHRTR)iso04_uni.h \
 $(CHRTR)iso05_uni.h \
 $(CHRTR)iso06_uni.h \
 $(CHRTR)iso07_uni.h \
 $(CHRTR)iso08_uni.h \
 $(CHRTR)iso09_uni.h \
 $(CHRTR)iso10_uni.h \
 $(CHRTR)iso13_uni.h \
 $(CHRTR)iso14_uni.h \
 $(CHRTR)iso15_uni.h \
 $(CHRTR)koi8r_uni.h \
 $(CHRTR)koi8u_uni.h \
 $(CHRTR)mac_uni.h \
 $(CHRTR)mnem2_suni.h \
 $(CHRTR)mnem_suni.h \
 $(CHRTR)next_uni.h \
 $(CHRTR)pt154_uni.h \
 $(CHRTR)rfc_suni.h \
 $(CHRTR)utf8_uni.h \
 $(CHRTR)viscii_uni.h

$(TABLES):
	-cd chrtrans && $(MAKE_RECUR) tables

UCdomap$o :	UCdomap.c \
		chrtrans/UCkd.h \
		chrtrans/makeuctb$(BUILD_EXEEXT) \
		chrtrans/makeuctb.c \
	UCdomap.h $(CMN)UCMap.h $(TABLES) $(top_srcdir)/userdefs.h

chrtrans/makeuctb$(BUILD_EXEEXT):
	cd chrtrans && $(MAKE_RECUR) makeuctb$(BUILD_EXEEXT)

UCAux$o : UCAux.c $(CMN)UCAux.h $(CMN)UCDefs.h
LYCookie$o : $(top_srcdir)/userdefs.h

test_mktime.o: $(srcdir)/LYmktime.c
	$(CC) -o $@ $(CC_OPTS) -DTEST_DRIVER -c $(srcdir)/LYmktime.c

# test-driver for LYmktime
test_mktime: test_mktime.o parsdate.o LYebcdic.o
	$(CC) -o $@ $(CC_OPTS) test_mktime.o parsdate.o LYebcdic.o

# update generated source (may be in ".", or srcdir)
parsdate.c : $(srcdir)/parsdate.y
	$(YACC)  $(srcdir)/parsdate.y
	-rm -f $@
	mv y.tab.c $@

depend : $(TABLES)
	makedepend -fmakefile -- $(CC_OPTS) -- $(C_SRC)

# DO NOT DELETE THIS LINE -- make depend depends on it.