--- smeserver-coova-chilli-0.2/root/etc/e-smith/templates/etc/rc.d/init.d/masq/00Functions01Chilli40forwardFrom.fixe_allow_uamallowed 2009-06-11 02:39:29.000000000 +0200 +++ smeserver-coova-chilli-0.2/root/etc/e-smith/templates/etc/rc.d/init.d/masq/00Functions01Chilli40forwardFrom 2009-06-11 02:40:59.000000000 +0200 @@ -36,13 +36,14 @@ } foreach (split(/[;,]/, ${'chilli'}{'uamallowed'} || '')){ - # Check the rules has the form proto:remote_host:remote_port - # Or host:port or protocol:host - next unless /^((tcp|TCP|udp|UDP):)?((${ReIpAddr})|((\w+\.)?\w+\.\w{2,3}))(:${RePort})?$/; - my $proto = $1; - my $host = $2; - my $dport = $3; - $OUT .= " # $_ is allowed:\n"; + # Check the rules has the form proto:remote_host:remote_port + # Or host:port or protocol:host + next unless /^((tcp|TCP|udp|UDP):)?(${ReIpAddr})(:${RePort})?$/; + my @param = split(/:/, $_); + my $proto = $param[0]; + my $host = $param[1]; + my $dport = $param[2]; + $OUT .= " # $_ is allowed:\n"; $OUT .= " /sbin/iptables -A FORWARD_FROM_CHILLI "; $OUT .= "-p $proto " if (($proto) && ($proto ne '')); $OUT .= "-d $host "; @@ -51,6 +52,7 @@ $OUT .= "-j ACCEPT\n" } + # Allow the two dns servers specified $OUT .= " # Allow dns requests to ${'chilli'}{'dns1'}\n" . " /sbin/iptables -A FORWARD_FROM_CHILLI -p udp --dport 53 -d ${'chilli'}{'dns1'} -j ACCEPT\n"