RE: port forwarding with IP TABLES - bad argument

Vincent_Valdez_at_Dell.com
Date: 09/25/03

  • Next message: Sean Estabrooks: "Re: Kernel Update - if it's not broke do I fix it?"
    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
    

  • Next message: Sean Estabrooks: "Re: Kernel Update - if it's not broke do I fix it?"

    Relevant Pages

    • Re: Pipe command output to listbox
      ... I've put together a simple script in Tcl to run another command-line ... DarwinPort's port list all command, ... executing exec correctly. ... |>The error message complains that the number of arguments to ListPackages ...
      (comp.lang.tcl)
    • Re: [SLE] email
      ... command' not 'file'. ... I have created a file called signature and placed it in my home ... You're seeing the contents of the script file because Mozilla can only ... do that -- it can't, AFAIK, paste in the results of executing a script ...
      (SuSE)
    • Re: is there a very simple script interpreter?
      ... yes it will be executed via reflection on the currently executing assembly. ... script that will be interpretted at runtime. ... > look at your object and see if it has a Command corresponding to the ...
      (microsoft.public.dotnet.languages.csharp)
    • Jumpstart: syntax error and trying to load from /cdrom media, which disk to use for Solaris 8 image
      ... I'm not sure if I need to use that disk or the Solaris 8 Installation ... Using RPC Bootparams for network configuration information. ... Using finish script: diag_drv.fin ... Executing JumpStart preinstall phase... ...
      (SunManagers)
    • QUESTION: shared libraries
      ... how would I create a package easy-to-install for a new user? ... we could use a script to install the package. ... I have seen some scripts executing from a ... Gouvernement du Canada / Government of Canada ...
      (comp.os.linux.development.apps)