- File was rerolled to fix some spelling
- Add rc script - Pass maintainership to submitter PR: 127940 Submitted by: SeaD <sead@deep.perm.ru>
This commit is contained in:
parent
92f70e98d6
commit
52ca764a5d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=221659
6 changed files with 61 additions and 44 deletions
|
@ -1,5 +1,5 @@
|
|||
# New ports collection makefile for: ipguard
|
||||
# Date created: 2 Sep 2005
|
||||
# Ports collection makefile for: ipguard
|
||||
# Date created: 6 Oct 2008
|
||||
# Whom: SeaD
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
@ -7,37 +7,25 @@
|
|||
|
||||
PORTNAME= ipguard
|
||||
PORTVERSION= 1.00
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= security net
|
||||
MASTER_SITES= http://ipguard.deep.perm.ru/files/
|
||||
MASTER_SITES= http://ipguard.deep.perm.ru/files/ http://deep.perm.ru/files/ipguard/
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
MAINTAINER= sead@deep.perm.ru
|
||||
COMMENT= Tool designed to protect LAN IP adress space by ARP spoofing
|
||||
|
||||
BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet
|
||||
BUILD_DEPENDS= ${LOCALBASE}/lib/libnet11/libnet.a:${PORTSDIR}/net/libnet
|
||||
|
||||
MAN8= ipguard.8
|
||||
|
||||
ETHERS?= /etc/ethers
|
||||
|
||||
MAKE_ARGS+= ETHERS=${ETHERS}
|
||||
|
||||
SUB_FILES= pkg-message
|
||||
SUB_LIST= ETHERS=${ETHERS}
|
||||
|
||||
LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet11-config
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -Ee \
|
||||
's|libnet-config|${LIBNET_CONFIG}|; \
|
||||
s|^(INCLUDES=).*|\1`${LIBNET_CONFIG} --cflags`|' \
|
||||
${WRKSRC}/${MAKEFILE}
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/ipguard ${PREFIX}/sbin
|
||||
${INSTALL_MAN} ${WRKSRC}/doc/ipguard.8 ${MANPREFIX}/man/man8
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/doc/ipguard.sh.sample ${PREFIX}/etc/rc.d
|
||||
USE_RC_SUBR= ${PORTNAME}
|
||||
MAN8= ${PORTNAME}.8
|
||||
DOCS= COPYRIGHT NEWS README README.tcpdump README.log ethers.sample rfc826.txt
|
||||
|
||||
post-install:
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
.ifndef(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
.for doc in ${DOCS}
|
||||
@${INSTALL_DATA} ${WRKSRC}/doc/${doc} ${DOCSDIR}
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
MD5 (ipguard-1.00.tar.gz) = 3b8e99994a283c549e2e7f452ef38fd7
|
||||
SHA256 (ipguard-1.00.tar.gz) = fb9d7f34a9c83976a1186f6fd33b04e31462beee7550c95001132aef3d08322e
|
||||
SIZE (ipguard-1.00.tar.gz) = 25095
|
||||
MD5 (ipguard-1.00.tar.gz) = e01642d590a3e34991100e179732a686
|
||||
SHA256 (ipguard-1.00.tar.gz) = 39ba935b664a4ac222f49cfc1e82084059fb29063ce7f41d58be80eed0d35b3f
|
||||
SIZE (ipguard-1.00.tar.gz) = 25484
|
||||
|
|
30
security/ipguard/files/ipguard.in
Normal file
30
security/ipguard/files/ipguard.in
Normal file
|
@ -0,0 +1,30 @@
|
|||
#! /bin/sh
|
||||
|
||||
# PROVIDE: ipguard
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
|
||||
# Add the following lines to /etc/rc.conf to enable ipguard:
|
||||
#
|
||||
# ipguard_enable="YES"
|
||||
# ipguard_interface="iface"
|
||||
# ipguard_flags="-u 300 -xz"
|
||||
|
||||
. %%RC_SUBR%%
|
||||
|
||||
name=ipguard
|
||||
rcvar=`set_rcvar`
|
||||
start_precmd=ipguard_precmd
|
||||
command=%%PREFIX%%/sbin/${name}
|
||||
|
||||
ipguard_enable=${ipguard_enable:-"NO"}
|
||||
ipguard_interface=${ipguard_interface:-"fxp0"}
|
||||
ipguard_flags=${ipguard_flags:-"-u 300 -xz"}
|
||||
|
||||
ipguard_precmd() {
|
||||
command_args="$command_args ${ipguard_interface}"
|
||||
pidfile="/var/run/${name}_${ipguard_interface}.pid"
|
||||
}
|
||||
|
||||
load_rc_config ${name}
|
||||
run_rc_command "$1"
|
|
@ -1,8 +0,0 @@
|
|||
|
||||
===> INSTALL NOTES:
|
||||
Now create %%ETHERS%% file
|
||||
(see ethers(5))
|
||||
and then start ipguard:
|
||||
(cd %%PREFIX%%/etc/rc.d
|
||||
mv ipguard.sh.sample ipguard.sh
|
||||
%%PREFIX%%/etc/rc.d/ipguard.sh start)
|
|
@ -1,8 +1,8 @@
|
|||
ipguard listens network for ARP packets. All permitted MAC/IP pairs
|
||||
listed in 'ethers' file. If it recieves one with MAC/IP pair, which is
|
||||
ipguard listens network for ARP packets. All permitted MAC-IP pairs
|
||||
listed in 'ethers' file. If it recieves one with MAC-IP pair, which is
|
||||
not listed in 'ethers' file, it will send ARP reply with configured
|
||||
fake address. This will prevent not permitted host to work properly
|
||||
in this ethernet segment. Especially Windows(TM) hosts.
|
||||
fake address. This will prevent not permitted host to work properly in
|
||||
local ethernet segment.
|
||||
|
||||
Author SeaD <sead@mail.ru>
|
||||
Author SeaD <sead@deep.perm.ru>
|
||||
WWW: http://ipguard.deep.perm.ru/
|
||||
|
|
|
@ -1,2 +1,9 @@
|
|||
sbin/ipguard
|
||||
etc/rc.d/ipguard.sh.sample
|
||||
%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT
|
||||
%%PORTDOCS%%%%DOCSDIR%%/NEWS
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README.tcpdump
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README.log
|
||||
%%PORTDOCS%%%%DOCSDIR%%/ethers.sample
|
||||
%%PORTDOCS%%%%DOCSDIR%%/rfc826.txt
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
|
|
Loading…
Reference in a new issue