-
Notifications
You must be signed in to change notification settings - Fork 0
sample
Hill Liu edited this page Apr 6, 2019
·
7 revisions
#!/bin/bash
## Set outside network
EXT_IF="eth0"
## Service open to outside
OPEN_PORT="80 443 22"
DOCKER_PORT=""
## Trust (open all ports)
TRUST_HOSTS=(
"1.1.1.1"
"2.2.2.2"
"3.3.3.3"
)
host=$(printf " %s" "${TRUST_HOSTS[@]}")
/yourpath/iptable-util -e $EXT_IF -o "$OPEN_PORT" -t "$host" --docker-port "$DOCKER_PORT"