Results 1 to 2 of 2

Thread: post-firewall issue

  1. #1

    Cool post-firewall issue

    Hi all,

    I’m trying to use post-firewall in the /usr/local/sbin directory though each time I try to run it I get an error of (-sh: /usr/local/sbin/post-firewall: not found)

    I know the settings work because I can cut and paste into the CLI but for some reason it won’t in the file?

    I’m sure it should work, can anyone help?

    The script "post-firewall":
    #!/bin/sh
    /usr/sbin/iptables -t nat -I PREROUTING -s X.X.X.X -p tcp --dport 3389 -j DNAT --to 10.0.0.3:3389
    /usr/sbin/iptables -I FORWARD -s X.X.X.X -p tcp -d 10.0.0.3 --dport 3389 -j ACCEPT


    The Direcory attributes:
    [admin@ASUS root]$ ls /usr/local/sbin -all
    drwxr-xr-x 1 admin root 0 Jan 1 1970 .
    drwxr-xr-x 1 admin root 0 Jan 1 2000 ..
    -rwxr-xr-x 1 admin root 598 Oct 2 15:15 post-boot
    -rwxr-xr-x 1 admin root 262 Oct 3 17:26 post-firewall
    -rwxr-xr-x 1 admin root 0 Oct 3 17:23 post-mount
    -rwxr-xr-x 1 admin root 0 Oct 3 17:24 pre-shutdown


    Trying to run it from the CLI:
    [admin@ASUS root]$ /usr/local/sbin/post-firewall
    -sh: /usr/local/sbin/post-firewall: not found

    Thanks,
    sm

  2. #2
    Fixed it,

    I deleted the file and recreated it, that fixed it for some strange reason

Similar Threads

  1. Problem with firewall settings
    By sce in forum WL-500g Q&A
    Replies: 0
    Last Post: 27-03-2006, 13:06
  2. Post lost?
    By ikerstges in forum WL-500g Q&A
    Replies: 3
    Last Post: 15-02-2006, 12:41

Posting Permissions

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