NAT-rules-fixed-IPv4-provider/NAT_2_norrsken
Oracle Public Cloud User eb0f71edfa first commit
2024-02-06 23:21:45 +00:00

19 lines
514 B
Bash
Executable file

#!/bin/bash
# Static configuration for the host we are NATting towards
# * ORIGINAL_DESTINATION_IP is the private IP corresponding to the desired public IP
# * RULES contains "original_destination_port:forward_to_port"
INTERFACE_SOURCE="ens3"
ORIGINAL_DESTINATION_IP="10.0.0.143"
FORWARD_TO_IP="10.0.100.20"
RULES=(
"53:5300"
"53:5300/udp"
"80:8000"
"443:4430"
"443:4430/udp"
)
# Runs the actual script
CURRENT_DIR="$(dirname "$(readlink -f "$0")")"
. "$CURRENT_DIR/configure_NAT_from_RULES"