1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
TP-Link_Archer-XR500v/EN7526G_3.18Kernel_SDK/filesystem/usr/script/nat_start.sh
2024-07-22 01:58:46 -03:00

38 lines
635 B
Bash
Executable File

#!/bin/sh
if [ $# != 1 ] ; then
echo "usage: $0 [interface]"
exit 0
fi
#i=$1
WAN_IF=$1
#
# Rebuild NAT rule
#
#NAT Virtual Server
for j in 0 1 2 3 4 5 6 7 8 9
do
#VS_CONF=/etc/nat_pvc$i/vserver$j
VS_CONF=/var/run/$WAN_IF/vserver$j
if [ -f $VS_CONF ] ; then
/usr/script/vserver.sh add $WAN_IF $j
fi
done
#NAT DMZ
DMZ_CONF=/var/run/$WAN_IF/dmz
if [ -f $DMZ_CONF ] ; then
/usr/script/dmz.sh $WAN_IF
fi
#NAT IP address mapping
#for j in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#do
# IPADDRMAPPING_CONF=/etc/nat_pvc$i/ipaddr_mapping$j
# if [ -f $IPADDRMAPPING_CONF ] ; then
# /usr/script/ipaddr_mapping.sh add $i $j
# fi
#done