Results 1 to 7 of 7

Thread: post-firewall script is not being executed

  1. #1

    post-firewall script is not being executed

    After I had overcome all troubles with setting up the post-firewall script (to get the thttpd Server running) I realized that the script is not being called after reconnecting to ISP and rebooting the router.
    post-boot and post firewall are in the same folder and post-boot is being executed.
    As soon as I call:
    Code:
    iptables -I INPUT 2 -p tcp --dport 80 -j ACCEPT
    iptables -I INPUT 2 -p tcp --dport 81 -j ACCEPT
    both ports are reported as open and the webserver is working.

    Is it correct, that /usr/local is linked to /tmp/local ?
    Code:
    [admin@(none) /usr]$ ls -F
    X11R6/     codepages/ lib/       sbin/
    bin/       etc/       local@     tmp@
    [admin@(none) /usr]$

  2. #2
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Do you've #!/bin/sh as the first line?
    Yes, the links are correct.

  3. #3
    Quote Originally Posted by Oleg
    Do you've #!/bin/sh as the first line?
    Yes, the links are correct.
    this is my post-firewall:
    Code:
    [admin@(none) root]$ cat /tmp/local/sbin/post-firewall
    #!/bin/sh
    iptables -I INPUT 2 -p tcp --dport 80 -j ACCEPT
    iptables -I INPUT 2 -p tcp --dport 81 -j ACCEPT
    iptables -t nat -A PREROUTING -i $1 -p tcp --dport 80 -j DNAT --to-destination $4:81
    [admin@(none) root]$

  4. #4
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Which connection type do you have?

  5. #5
    Quote Originally Posted by Oleg
    Which connection type do you have?
    PPPoE

    I have PPPoE Relay disabled, could this be the problem?

  6. #6
    Join Date
    Jan 2005
    Location
    Kysice,Czech Republic
    Posts
    46
    can you run the script manually? (ergo
    Code:
    /tmp/local/sbin/post-firewall
    )
    (it would give back some error messages since variables such as $1 would not be recognized)

  7. #7
    I think, I got it working now, I lost all my settings after changing something in the webinterface and restarting the router.
    After setting up post-boot and post-firewall from scratch, the ports are finally open without me having to open them manually.
    I'll wait until tonight (the next reconnect to the isp) in order to see if it really is working now. If not, I'll try to run the script as stated below.
    Quote Originally Posted by sup
    can you run the script manually? (ergo
    Code:
    /tmp/local/sbin/post-firewall
    )
    (it would give back some error messages since variables such as $1 would not be recognized)

Similar Threads

  1. Start own script in post-boot or post-firewall
    By m-h-l in forum WL-500g Q&A
    Replies: 2
    Last Post: 30-09-2005, 19:03
  2. Replies: 2
    Last Post: 20-09-2005, 11:50
  3. Replies: 0
    Last Post: 19-09-2005, 12:52
  4. post-boot is not executed - what's wrong?
    By sbn in forum WL-500g Q&A
    Replies: 0
    Last Post: 11-06-2005, 12:17
  5. Replies: 3
    Last Post: 24-12-2004, 19:13

Posting Permissions

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