RE: port forwarding with IP TABLES - bad argument
Vincent_Valdez_at_Dell.com
Date: 09/25/03
- Previous message: Ed Wilts: "openssh on ES2.1 (was: using)"
- Maybe in reply to: Noah: "port forwarding with IP TABLES - bad argument"
- Next in thread: Brenden T.: "Re: port forwarding with IP TABLES - bad argument"
- Reply: Brenden T.: "Re: port forwarding with IP TABLES - bad argument"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: redhat-list@redhat.com Date: Thu, 25 Sep 2003 13:01:42 -0500
> -----Original Message-----
> From: Noah [mailto:admin2@enabled.com]
> Sent: Thursday, September 25, 2003 9:03 AM
> To: redhat-list@redhat.com
> 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:redhat-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list
- Previous message: Ed Wilts: "openssh on ES2.1 (was: using)"
- Maybe in reply to: Noah: "port forwarding with IP TABLES - bad argument"
- Next in thread: Brenden T.: "Re: port forwarding with IP TABLES - bad argument"
- Reply: Brenden T.: "Re: port forwarding with IP TABLES - bad argument"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|