From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick Leslie Polzer Subject: Re: Please, see this firewall and say (have pity...:) Date: Thu, 10 Jun 2004 09:55:03 +0200 Sender: netfilter-admin@lists.netfilter.org Message-ID: <20040610095503.521ce916.leslie.polzer@gmx.net> References: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Content-Type: text/plain; charset="us-ascii" To: netfilter@lists.netfilter.org On Thu, 10 Jun 2004 01:36:28 -0300 "Ricardo C" wrote: > You could give me your opinions???? I don't have enough time to comment on all of this, but using loops increases readability, so $IPTABLES -t nat -A PREROUTING -p tcp -d $INET_IP --dport 4661 -j DNAT --to-destination 192.168.111.2:4661 $IPTABLES -t nat -A PREROUTING -p tcp -d $INET_IP --dport 4662 -j DNAT --to-destination 192.168.111.2:4662 $IPTABLES -t nat -A PREROUTING -p tcp -d $INET_IP --dport 4711 -j DNAT --to-destination 192.168.111.2:4711 $IPTABLES -t nat -A PREROUTING -p UDP -d $INET_IP --dport 4000 -j DNAT --to-destination 192.168.111.2:4000 $IPTABLES -t nat -A PREROUTING -p UDP -d $INET_IP --dport 4665 -j DNAT --to-destination 192.168.111.2:4665 $IPTABLES -t nat -A PREROUTING -p UDP -d $INET_IP --dport 4672 -j DNAT --to-destination 192.168.111.2:4672 should become for port in 4661 4662 4711 4000 4665 4672; do $IPTABLES -t nat -A PREROUTING -p tcp -d $INET_IP --dport $port -j DNAT --to-destination 192.168.111.2 done Apply this to other apt locations in your firewall script as well. Kind regards, Leslie