#!/bin/sh
template=intsrv-
allowed_access="333.222.111.99,222.333.444.555"
hosts_list=`grep $template /etc/hosts|cut -f 1 -s`
for host in $hosts_list
do
last_part=`echo $host|cut -d . -f 4`
echo iptables -t nat -A PREROUTING -p tcp -i eth1 -d 333.333.333.333 --dport 22$last -j DNAT --to 10.1.3.$last:22
done
Автоматически формирует
(
Read more... )