Find the answer to your Linux question:
Results 1 to 6 of 6
Good [insert applicable time-of-day salutation] I have an old iptables script (?) that I got from iptablesrocks.org, which works fine with my antique Fedora 4 system. I transferred it to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! Mistoffeles's Avatar
    Join Date
    Jul 2006
    Location
    Northern BC, Canada
    Posts
    54

    old iptables script not working with new install


    Good [insert applicable time-of-day salutation]

    I have an old iptables script (?) that I got from iptablesrocks.org, which works fine with my antique Fedora 4 system.

    I transferred it to a brand new RHEL 5.3 install, but when I go to use 'iptables-restore < firewall_script' it throws a 'no command specified' error at the very last line of the script, which I have never seen before. The script works fine on Fedora 10 and RHEL 5.1, I am pretty sure it even works fine on RHEL 5.2.

    Could it be that the fact that I am using 64-bit Linux for the first time, and need to do something different?

    Here is the script:

    http://www.iptablesrocks.org/example..._server.config

  2. #2
    Linux Engineer Thrillhouse's Avatar
    Join Date
    Jun 2006
    Location
    Arlington, VA, USA
    Posts
    1,377
    The script works fine for me on CentOS 5.3 with iptables version 1.3.5. Are you sure there's no special characters at the end of the script?

  3. #3
    Just Joined! Mistoffeles's Avatar
    Join Date
    Jul 2006
    Location
    Northern BC, Canada
    Posts
    54
    I thought of that, so I loaded it up into emacs and 'deleted' anything that might have been at the end of the line there. Maybe I'll do every line, although it's only complaining about the very last line.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined! Mistoffeles's Avatar
    Join Date
    Jul 2006
    Location
    Northern BC, Canada
    Posts
    54
    It turned out to be the second last line, although iptables-restore complained about the last line.

    Echoes of COBOL debugging! LOL

  6. #5
    Linux Engineer Thrillhouse's Avatar
    Join Date
    Jun 2006
    Location
    Arlington, VA, USA
    Posts
    1,377
    Glad you got it working.

    Next time, it might be easier to simply run dos2unix on the script.

  7. #6
    Just Joined! Mistoffeles's Avatar
    Join Date
    Jul 2006
    Location
    Northern BC, Canada
    Posts
    54
    I don't know if that would help as this file has never touched a non-Linux system.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •