Add 'nat_netwoks' i.e. 172.16.1.0/24 on interface eth1.

This commit is contained in:
Christoph 2017-04-16 12:48:13 +02:00
parent 636f55f3a5
commit f668ea62fe
2 changed files with 27 additions and 6 deletions

View File

@ -567,6 +567,8 @@ local_ntp_service=true
# - SNMP services local Networks # - SNMP services local Networks
# - # -
# - Blank separated list of ip's
# -
snmp_server_ips="" snmp_server_ips=""
# - SNMP Port # - SNMP Port
@ -852,10 +854,27 @@ other_services=""
# --- Masuqerading # --- Masuqerading
# ============= # =============
# - Masquerade (NAT) networks
# -
# - nat_networks="<src-network>:<output-device> [<src-network>:<output-device>] [.."
# -
# - Multiple declarations (blank separated list) are possible
# -
# - Example:
# - nat_network="172.16.1.0/24:${local_if_2}
# - 172.16.63.0/24:${ext_if_static_1}"
# -
# - 172.16.1.0/24 Rescue network (routers)
# -
nat_networks=""
# - Masquerade TCP Connections # - Masquerade TCP Connections
# - # -
# - masquerade_tcp_con="<src-network>:<dst-host>:<dst-port>:<output-device> [<src-network>:<dst-host>:..]" # - masquerade_tcp_con="<src-network>:<dst-host>:<dst-port>:<output-device> [<src-network>:<dst-host>:..]"
# - # -
# - Multiple declarations (blank separated list) are possible
# -
# - Example: # - Example:
# - # -
# - masquerade_tcp_con="192.168.63.0/24:192.168.62.244:80:${local_if_1} # - masquerade_tcp_con="192.168.63.0/24:192.168.62.244:80:${local_if_1}
@ -876,14 +895,12 @@ masquerade_tcp_cons=""
# - # -
# - portforward_tcp="<device-in>:<port-in>:<ip-to-forward>:<port-out>" # - portforward_tcp="<device-in>:<port-in>:<ip-to-forward>:<port-out>"
# - # -
# - Multiple declarations are possible # - Multiple declarations (blank separated list) are possible
# - # -
# - Example: # - Example:
# - portforward_tcp="$ext_if_dsl_1:9997:192.168.52.25:22 # - portforward_tcp="$ext_if_dsl_1:9997:192.168.52.25:22
# - $ext_if_dsl_1:9998:192.168.53.24:22" # - $ext_if_dsl_1:9998:192.168.53.24:22"
# - # -
# - Blank separated list
# -
portforward_tcp="" portforward_tcp=""
@ -891,14 +908,12 @@ portforward_tcp=""
# - # -
# - portforward_udp="<device-in>:<udp-port-in>:<ip-to-forward>:<udp-port-out>" # - portforward_udp="<device-in>:<udp-port-in>:<ip-to-forward>:<udp-port-out>"
# - # -
# - Multiple declarations are possible # - Multiple declarations (blank separated list) are possible
# - # -
# - Example: # - Example:
# - portforward_udp="$ext_if_dsl_1:1094:192.168.52.25:1094 # - portforward_udp="$ext_if_dsl_1:1094:192.168.52.25:1094
# - $ext_if_dsl_1:9999:192.168.53.24:1095" # - $ext_if_dsl_1:9999:192.168.53.24:1095"
# - # -
# - Blank separated list
# -
portforward_udp="" portforward_udp=""

View File

@ -8,6 +8,12 @@
# --- # ---
# - Masquerade TCP Connections # - Masquerade TCP Connections
# --- # ---
declare -a nat_network_arr
for _net in $nat_networks ; do
nat_network_arr+=("$_net")
done
declare -a masquerade_tcp_con_arr declare -a masquerade_tcp_con_arr
for _str in $masquerade_tcp_cons ; do for _str in $masquerade_tcp_cons ; do
masquerade_tcp_con_arr+=("$_str") masquerade_tcp_con_arr+=("$_str")