add rinetd

This commit is contained in:
kev 2018-02-06 18:08:53 +08:00
parent 4a344737b5
commit 77f2d957c3
5 changed files with 71 additions and 0 deletions

View File

@ -95,6 +95,7 @@ A collection of delicious docker recipes.
- [x] portia
- [x] pure-ftpd
- [x] redis-arm
- [x] rinetd
- [x] rslsync
- [x] rsyncd
- [x] rsyslog

24
rinetd/Dockerfile Normal file
View File

@ -0,0 +1,24 @@
#
# Dockerfile for rinetd
#
FROM alpine
MAINTAINER kev <noreply@easypi.pro>
ENV RINETD_VERSION 0.70
ENV RINETD_URL https://github.com/samhocevar/rinetd/releases/download/v${RINETD_VERSION}/rinetd-${RINETD_VERSION}.tar.gz
RUN set -xe \
&& apk add --no-cache build-base curl tar \
&& mkdir rinetd \
&& cd rinetd \
&& curl -sSL $RINETD_URL | tar xz --strip 1 \
&& ./configure --prefix=/usr --sysconfdir=/etc/rinetd \
&& make install \
&& cd .. \
&& rm -r rinetd \
&& apk del build-base curl tar
VOLUME /etc/rinetd
CMD ["rinetd", "-f", "-c", "/etc/rinetd/rinetd.conf"]

8
rinetd/README.md Normal file
View File

@ -0,0 +1,8 @@
rinetd
======
[rinetd][1] is used to efficiently redirect connections from one IP
address/port combination to another. It is useful when operating virtual
servers, firewalls and the like.
[1]: https://github.com/samhocevar/rinetd

32
rinetd/data/rinetd.conf Normal file
View File

@ -0,0 +1,32 @@
#
# this is the configuration file for rinetd, the internet redirection server
#
# you may specify global allow and deny rules here
# only ip addresses are matched, hostnames cannot be specified here
# the wildcards you may use are * and ?
#
# allow 192.168.2.*
# deny 192.168.2.1?
#
# forwarding rules come here
#
# you may specify allow and deny rules after a specific forwarding rule
# to apply to only that forwarding rule
#
# bindadress bindport connectaddress connectport options...
# 0.0.0.0 80 192.168.1.2 80
# 127.0.0.1 4000 127.0.0.1 3000
# 127.0.0.1 4000/udp 127.0.0.1 22 [timeout=1200]
# 127.0.0.1 8000/udp 192.168.1.2 8000/udp [src=192.168.1.2,timeout=1200]
127.0.0.1 5353/udp 8.8.8.8 53/udp
# logging information
# logfile /var/log/rinetd.log
logfile /dev/stdout
# uncomment the following line if you want web-server style logfile format
# logcommon

View File

@ -0,0 +1,6 @@
rinetd:
image: vimagick/rinetd
volumes:
- ./data:/etc/rinetd
net: host
restart: always