> -----Original Message-----
> From: Noah [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 25, 2003 9:03 AM
> To: [EMAIL PROTECTED]
> Subject: port forwarding with IP TABLES - bad argument
> 
> $IPTABLES -A PREROUTING -t nat -p tcp -d $EXTIP --dport 10700 
> -j DNAT --to
> $PORTFWIP:10700
<snip>
> Bad argument `10700'

Noah,

That command should work, as long as the "$PORTFWIP:10700" is on the same
line as everything else.  Try executing it outside the script:

#iptables -A PREROUTING -t nat -p tcp -d 10.0.0.1 --dport 10700 -j DNAT --to
10.1.1.1:10700

Of course, just replace 10.0.0.1 and 10.1.1.1 with your correct ips.  If you
get a command line, and no errors, (check the status with "service iptables
status") then there may be something odd in the script.    

There may be a carriage return in the line somewhere, or one of the
variables may not have a value.  You can always duplicate the line in the
script just before it executes for debugging purposes as such:

--add to script before PORTFWIP line--
echo This should be executed next: "$IPTABLES -A PREROUTING -t nat -p tcp -d
$EXTIP --dport 10700  -j DNAT --to $PORTFWIP:10700"
--add to script before PORTFWIP line--

You should see the text followed by the actual line to be executed, with the
variable's values.  If any of the variables are empty, start troubleshooting
it from there.

--
Regards,

Vinny Valdez





-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to