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":
    /usr/sbin/iptables -t nat -I PREROUTING -s X.X.X.X -p tcp --dport 3389 -j DNAT --to
    /usr/sbin/iptables -I FORWARD -s X.X.X.X -p tcp -d --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


  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, 14:06
  2. Post lost?
    By ikerstges in forum WL-500g Q&A
    Replies: 3
    Last Post: 15-02-2006, 13: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