Results 1 to 19 of 19
  1. #1
    Join Date
    Jun 2005
    Posts
    72

    APF not installing (Looked for loads of fixes!!!)

    I followed this tutorial on how to install APF.... http://www.eth0.us/apf

    i have tried loads of other tutorials (including Webhostgear) and i get this error when i try to start or restart the firewall etc, it says "No such file or directory27: /etc/apf" but /etc/apf does exsist and has been configured and all files were CHMOD'd to 0777 to make sure this wasn't a simple permissions error, does anyone have any ideas? My servers OS is CentOs 3.5, thanks in advance!


    [email protected] [~]# apf -s
    : command not found: line 9:
    : command not found: line 16:
    : command not found: line 20:
    : command not found: line 24:
    : command not found: line 28:
    : command not found: line 33:
    : command not found: line 35:
    : command not found: line 39:
    : command not found: line 46:
    : command not found: line 50:
    : command not found: line 56:
    : command not found: line 60:
    : command not found: line 64:
    : command not found: line 70:
    : command not found: line 71:
    : command not found: line 75:
    : command not found: line 82:
    : command not found: line 90:
    : command not found: line 96:
    : command not found: line 102:
    : command not found: line 107:
    : command not found: line 111:
    : command not found: line 115:
    : command not found: line 118:
    : command not found: line 134:
    : command not found: line 140:
    : command not found: line 146:
    : command not found: line 151:
    : command not found: line 157:
    : command not found: line 164:
    : command not found: line 170:
    : command not found: line 178:
    : command not found: line 185:
    : command not found: line 191:
    : command not found: line 198:
    : command not found: line 203:
    : command not found: line 208:
    : command not found: line 212:
    : command not found: line 217:
    : command not found: line 224:
    : command not found: line 238:
    : command not found: line 248:
    : command not found: line 254:
    : command not found: line 267:
    : command not found: line 270:
    : command not found: line 273:
    : command not found: line 277:
    : command not found: line 294:
    : command not found: line 297:
    : command not found: line 300:
    : command not found: line 303:
    : command not found: line 307:
    : command not found: line 319:
    : command not found: line 322:
    : command not found: line 325:
    : command not found: line 335:
    : command not found: line 338:
    : command not found: line 346:
    : command not found: line 349:
    : command not found: line 357:
    : command not found: line 360:
    : command not found: line 363:
    : command not found: line 369:
    : command not found: line 372:
    : command not found: line 377:
    : command not found: line 382:
    : command not found: line 388:
    : command not found: line 392:
    : command not found: line 397:
    : command not found: line 402:
    : command not found: line 406:
    : command not found: line 411:
    : command not found: line 415:
    : command not found: line 419:
    : No such file or directory27: /etc/apf

  2. #2
    did you try running it from /etc/apf and not from /root?

  3. #3
    Join Date
    Jun 2005
    Posts
    72
    Umm, well i followed the tutorial, its installed in /usr/local/src/, what do you mean by where am i running it from?

  4. #4
    Join Date
    Sep 2004
    Location
    Flint, Michigan
    Posts
    5,765
    A firewall is not something to just install from a tutorial without having pretty good basic OS understanding beforehand. Very easy to break something or lock yourself out.

    Simple instructions:

    Code:
    mkdir /root/apffiles
    cd /root/apffiles
    wget http://www.r-fx.ca/downloads/apf-current.tar.gz
    tar zxfv apf-current.tar.gz
    cd apf*
    ./install.sh
    Then edit the conf (most likely /etc/apf/conf.apf) to your needs, and it should start up no problem.
    Mike from Zoodia.com
    Professional web design and development services.
    In need of a fresh hosting design? See what premade designs we have in stock!
    Web design tips, tricks, and more at MichaelPruitt.com

  5. #5
    Join Date
    Jun 2005
    Posts
    72
    I've just followed your instructions, i have the same error...

    is the command to start apf just apf -s, or do you have to cd to the directory of apf?

  6. #6
    Join Date
    Sep 2004
    Location
    Flint, Michigan
    Posts
    5,765
    Typcially speaking after apf is installed (have done it on many CentOS 3.x machines including just a few days ago on a fresh install of CentOS 3.5) you do not have to do anything.

    You can try doing this:

    whereis apf

    It should give you a few answers, one of them is most likely "/usr/local/sbin/apf"

    then try cd /usr/local/sbin
    then: ./apf -s

    see if it still spits that out, if it does, open up the apf file in /usr/local/sbin with a text editor (such as pico) and show us the lines you have around where a few of the errors are (ie. if you have an error at line 9, then show us like 5-15 or something).
    Mike from Zoodia.com
    Professional web design and development services.
    In need of a fresh hosting design? See what premade designs we have in stock!
    Web design tips, tricks, and more at MichaelPruitt.com

  7. #7
    Join Date
    Jun 2005
    Posts
    72
    [email protected] [/usr/local/sbin]# ./apf -s
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : command not found
    : No such file or directory

  8. #8
    Join Date
    Sep 2004
    Location
    Flint, Michigan
    Posts
    5,765
    There is nothing displayed before the : command not found

    ie: blah blah blah : command not found
    Mike from Zoodia.com
    Professional web design and development services.
    In need of a fresh hosting design? See what premade designs we have in stock!
    Web design tips, tricks, and more at MichaelPruitt.com

  9. #9
    Join Date
    Jun 2005
    Posts
    72
    nope... if you have APF, can you send your conf file, as i think it may be related to the conf file...

  10. #10
    Join Date
    Sep 2004
    Location
    Flint, Michigan
    Posts
    5,765
    It doesn't look like it's realted to the conf file at all, if you just start up the firewall with the default conf file it'll let you know if that's the problem or not.

    I'm pretty well lost on this one.
    Mike from Zoodia.com
    Professional web design and development services.
    In need of a fresh hosting design? See what premade designs we have in stock!
    Web design tips, tricks, and more at MichaelPruitt.com

  11. #11
    Join Date
    Oct 2001
    Location
    Ohio
    Posts
    8,299
    Is this a VPS?

    Do you know if there were any kind of kernel modifications made to the server when it was brought up?

  12. #12
    Join Date
    Jun 2005
    Posts
    72
    Its a dedicated server, regular kernal.. i had APF on it before, but i had the server reset, so i know it works with my server etc...

  13. #13
    Join Date
    Jun 2005
    Posts
    72
    I tried to start and stop apf, it actually gives some errors...

    [email protected] [~]# service apf start
    : command not foundne 9:
    : command not foundne 16:
    : command not foundne 20:
    : command not foundne 24:
    : command not foundne 28:
    : command not foundne 33:
    : command not foundne 35:
    : command not foundne 39:
    : command not foundne 46:
    : command not foundne 50:
    : command not foundne 56:
    : command not foundne 60:
    : command not foundne 64:
    : command not foundne 71:
    : command not foundne 75:
    : command not foundne 82:
    : command not foundne 90:
    : command not foundne 96:
    : command not foundne 102:
    : command not foundne 107:
    : command not foundne 111:
    : command not foundne 115:
    : command not foundne 118:
    : command not foundne 134:
    : command not foundne 140:
    : command not foundne 146:
    : command not foundne 151:
    : command not foundne 157:
    : command not foundne 164:
    : command not foundne 170:
    : command not foundne 178:
    : command not foundne 185:
    : command not foundne 191:
    : command not foundne 198:
    : command not foundne 203:
    : command not foundne 208:
    : command not foundne 212:
    : command not foundne 217:
    : command not foundne 224:
    : command not foundne 238:
    : command not foundne 248:
    : command not foundne 254:
    : command not foundne 267:
    : command not foundne 273:
    : command not foundne 277:
    : command not foundne 294:
    : command not foundne 297:
    : command not foundne 303:
    : command not foundne 307:
    : command not foundne 319:
    : command not foundne 322:
    : command not foundne 325:
    : command not foundne 335:
    : command not foundne 338:
    : command not foundne 346:
    : command not foundne 349:
    : command not foundne 357:
    : command not foundne 360:
    : command not foundne 363:
    : command not foundne 369:
    : command not foundne 372:
    : command not foundne 377:
    : command not foundne 382:
    : command not foundne 388:
    : command not foundne 392:
    : command not foundne 397:
    : command not foundne 402:
    : command not foundne 406:
    : command not foundne 411:
    : command not foundne 415:
    : command not foundne 419:
    : No such file or directory/etc/apf/
    /internals/functions.apf: No such file or directory
    : command not foundocal/sbin/apf: line 9:
    : command not found: line 16:
    : command not found: line 20:
    : command not found: line 24:
    : command not found: line 28:
    : command not found: line 33:
    : command not found: line 35:
    : command not found: line 39:
    : command not found: line 46:
    : command not found: line 50:
    : command not found: line 56:
    : command not found: line 60:
    : command not found: line 64:
    : command not found: line 71:
    : command not found: line 75:
    : command not found: line 82:
    : command not found: line 90:
    : command not found: line 96:
    : command not found: line 102:
    : command not found: line 107:
    : command not found: line 111:
    : command not found: line 115:
    : command not found: line 118:
    : command not found: line 134:
    : command not found: line 140:
    : command not found: line 146:
    : command not found: line 151:
    : command not found: line 157:
    : command not found: line 164:
    : command not found: line 170:
    : command not found: line 178:
    : command not found: line 185:
    : command not found: line 191:
    : command not found: line 198:
    : command not found: line 203:
    : command not found: line 208:
    : command not found: line 212:
    : command not found: line 217:
    : command not found: line 224:
    : command not found: line 238:
    : command not found: line 248:
    : command not found: line 254:
    : command not found: line 267:
    : command not found: line 273:
    : command not found: line 277:
    : command not found: line 294:
    : command not found: line 297:
    : command not found: line 303:
    : command not found: line 307:
    : command not found: line 319:
    : command not found: line 322:
    : command not found: line 325:
    : command not found: line 335:
    : command not found: line 338:
    : command not found: line 346:
    : command not found: line 349:
    : command not found: line 357:
    : command not found: line 360:
    : command not found: line 363:
    : command not found: line 369:
    : command not found: line 372:
    : command not found: line 377:
    : command not found: line 382:
    : command not found: line 388:
    : command not found: line 392:
    : command not found: line 397:
    : command not found: line 402:
    : command not found: line 406:
    : command not found: line 411:
    : command not found: line 415:
    : command not found: line 419:
    : No such file or directory27: /etc/apf/
    [ OK ]

    [email protected] [~]# service apf stop
    : command not foundne 9:
    : command not foundne 16:
    : command not foundne 20:
    : command not foundne 24:
    : command not foundne 28:
    : command not foundne 33:
    : command not foundne 35:
    : command not foundne 39:
    : command not foundne 46:
    : command not foundne 50:
    : command not foundne 56:
    : command not foundne 60:
    : command not foundne 64:
    : command not foundne 71:
    : command not foundne 75:
    : command not foundne 82:
    : command not foundne 90:
    : command not foundne 96:
    : command not foundne 102:
    : command not foundne 107:
    : command not foundne 111:
    : command not foundne 115:
    : command not foundne 118:
    : command not foundne 134:
    : command not foundne 140:
    : command not foundne 146:
    : command not foundne 151:
    : command not foundne 157:
    : command not foundne 164:
    : command not foundne 170:
    : command not foundne 178:
    : command not foundne 185:
    : command not foundne 191:
    : command not foundne 198:
    : command not foundne 203:
    : command not foundne 208:
    : command not foundne 212:
    : command not foundne 217:
    : command not foundne 224:
    : command not foundne 238:
    : command not foundne 248:
    : command not foundne 254:
    : command not foundne 267:
    : command not foundne 273:
    : command not foundne 277:
    : command not foundne 294:
    : command not foundne 297:
    : command not foundne 303:
    : command not foundne 307:
    : command not foundne 319:
    : command not foundne 322:
    : command not foundne 325:
    : command not foundne 335:
    : command not foundne 338:
    : command not foundne 346:
    : command not foundne 349:
    : command not foundne 357:
    : command not foundne 360:
    : command not foundne 363:
    : command not foundne 369:
    : command not foundne 372:
    : command not foundne 377:
    : command not foundne 382:
    : command not foundne 388:
    : command not foundne 392:
    : command not foundne 397:
    : command not foundne 402:
    : command not foundne 406:
    : command not foundne 411:
    : command not foundne 415:
    : command not foundne 419:
    : No such file or directory/etc/apf/
    /internals/functions.apf: No such file or directory
    Stopping APF:/etc/init.d/apf: line 26: eout: command not found
    /etc/init.d/apf: line 33: eout: command not found
    [ OK ]

  14. #14
    Join Date
    Jun 2005
    Posts
    72
    Ahh well i've been messing around and i've sorted it, thanks for your help anyway.

  15. #15
    Join Date
    Sep 2004
    Location
    Flint, Michigan
    Posts
    5,765
    What was the solution?!
    Mike from Zoodia.com
    Professional web design and development services.
    In need of a fresh hosting design? See what premade designs we have in stock!
    Web design tips, tricks, and more at MichaelPruitt.com

  16. #16
    Join Date
    Jun 2005
    Posts
    72
    Im not sure, i must of removed a comment or something in the config file while pasting the ports to allow.. anyway better get back to securing the server, bye.

  17. #17
    Join Date
    May 2004
    Location
    Lansing, MI, USA
    Posts
    1,548
    You were using 'su' and not 'su -' when you su'd to root.

    When you do this, iptables is not in your path.

    To fix this, always use 'su -' or use 'su' and then 'source /etc/profile'
    Jacob - WebOnce Technologies - 30 Day 100% Satisfaction Guarantee - Over 5 Years Going Strong!
    Website Hosting, PHP4&5, RoR, MySQL 5.0, Reseller Hosting, Development, and Designs
    Powered By JAM - Professional Website Development - PHP, MySQL, JavaScript, AJAX - Projects Small & Large

  18. #18
    Join Date
    Jun 2005
    Posts
    72
    No i didn't have to use su or su -, i just logged in as root when i was doing it, and it has worked now..

  19. #19
    Join Date
    May 2004
    Location
    Lansing, MI, USA
    Posts
    1,548
    Originally posted by galaxywebhosting
    No i didn't have to use su or su -, i just logged in as root when i was doing it, and it has worked now..
    Sorry, I was assuming normal security practices. I really believe that was your problem though, that iptables was not in your PATH environment for one reason or another. I've had the same thing happen before and just had to laugh at myself.
    Jacob - WebOnce Technologies - 30 Day 100% Satisfaction Guarantee - Over 5 Years Going Strong!
    Website Hosting, PHP4&5, RoR, MySQL 5.0, Reseller Hosting, Development, and Designs
    Powered By JAM - Professional Website Development - PHP, MySQL, JavaScript, AJAX - Projects Small & Large

Posting Permissions

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