SSH ip-whitelisting based on iptables and ipset
1.1K
A docker-container with ipset and iptables from kubernetes, inherited by
using debian-iptables
as a parent image.
This container can be used to implement ip based whitelisting of the SSH daemon.
By using the country-whitelist published by IPdeny, you agree to their Terms of Service (TOS) and are familiar with their Copyright notice and Privacy Policy.
The container can be configured with environment variables:
WHITELISTED_IPV4_IPS: list of IPv4 addresses separated by space that should be whitelistedWHITELISTED_IPV4_NETS: list of IPv4 networks separated by space that should be whitelistedWHITELISTED_IPV6_IPS: list of IPv6 addresses separated by space that should be whitelistedWHITELISTED_IPV6_NETS: list of IPv6 networks separated by space that should be whitelistedWHITELISTED_COUNTRIES: list of lowercase ISO 3166-1 alpha-2
country-codes to whitelist; source for the whitelist are hte country IP blocks published by
IPdenyAllow connections from Switzerland, IPv4 private IP addresses and the IPv4 address 8.8.8.8:
docker run \
--rm \
--privileged \
--net=host \
-e WHITELISTED_COUNTRIES="ch" \
-e WHITELISTED_IPV4_NETS="10.0.0.0/8 172.16.0.0/12 192.168.0.0/16" \
-e WHITELISTED_IPV4_IPS="8.8.8.8" \
linkyard/sshd-ipset-whitelist
Content type
Image
Digest
Size
22.9 MB
Last updated
almost 7 years ago
docker pull linkyard/sshd-ipset-whitelist