how to maintain my debian perfect setup

Discussion in 'HOWTO-Related Questions' started by cruz, Jan 21, 2008.

  1. cruz

    cruz New Member

    I have a debian 4.0 perfect setup server running a few websites now. Can someone please direct me into what applications I need on there to maintain a healthiy server? I just want to keep the server running smooth and to know when log files are giving warnings ext. Thanks for the advice in advance. I also have fai2ban on it at this time.
  2. unclecameron

    unclecameron New Member

    You can do a lot by running apt-get update/upgrade frequently, and/or put it on a crontab, also make sure the root e-mail address goes to you, so you'll get notifications. Also AWStats will tell you what's going on with your sites. You can also run things like Tripwire to see if critical files changed without you knowing it. If you get enough servers and you want to manage them remotely, you might look into something like Hyperic.
  3. cruz

    cruz New Member

    (make sure the root e-mail address goes to you) Where do I look for the root email so I can check it? (AWStats will tell you what's going on with your sites) Is this an aplication I need to install or is it application running in ispconfig? Also tripwire is somthing I would have to install right? sorry for all the questions. I am learning. Thanks for your time to exsplain it to me.
  4. edge

    edge Active Member Moderator

  5. unclecameron

    unclecameron New Member

    edit /etc/aliases and make sure these 2 lines are in there:

    postmaster: root
    root: [email protected]

    then run


    just change the e-mail address to you, and then your server will e-mail you any messages meant for system information to be sent to root.

    AWstats is a program you have to install, you can probably read up about it after you change the e-mail addresses above first. After you install AWstats you have to set it up, which might be beyond your skills now, but you can bookmark it as something to learn about when you get time :)
  6. Leszek

    Leszek New Member

    Remember that Fail2Ban can interfere with Bastille firewall (installed along with ISPConfig).
  7. cruz

    cruz New Member

    aliases change

    I changed the the file aliases and added the email address and the other area is already set to root.
    then run
    Now is there a command I need to run to exicute this program? Also I have ran into trubble while updating the software. It seems the fail2ban application has failed to update and has errors. How do I fix this? I tried to re run the update command and it just keeps hanging. Is there a way to uninstall fail2ban and reinstall the newer version? sorry I'm so green. Thanks for the advice.
    Remember that Fail2Ban can interfere with Bastille firewall 
    fail2ban was working great untill i tried to update it. I will look for info about the conflicts with the firewall so I can keep a eye out for problems after I get it running right again. Thanks for that piece of info Leszek.
    Last edited: Jan 26, 2008
  8. falko

    falko Super Moderator ISPConfig Developer

    No, just run
    and restart Postfix.

    Any errors in your logs?
  9. cruz

    cruz New Member

    fail3ban issues

    Here is what I get after restarting system.
    iptables -F fail2ban-<name>
    iptables -X fail2ban-<name>
    2008-01-27 13:06:45,662 fail2ban.actions.action: INFO   Set actionStart = iptables -N fail2ban-<name>
    iptables -A fail2ban-<name> -j RETURN
    iptables -I INPUT -p <protocol> --dport <port> -j fail2ban-<name>
    2008-01-27 13:06:45,663 fail2ban.actions.action: INFO   Set actionUnban = iptables -D fail2ban-<name> -s <ip> -j DROP
    2008-01-27 13:06:45,665 fail2ban.actions.action: INFO   Set actionCheck = iptables -n -L INPUT | grep -q fail2ban-<name>
    2008-01-27 13:06:46,350 fail2ban.actions.action: ERROR  iptables -N fail2ban-ssh
    iptables -A fail2ban-ssh -j RETURN
    iptables -I INPUT -p tcp --dport ssh -j fail2ban-ssh returned 400
    2008-01-27 13:06:46,351 fail2ban.actions.action: ERROR  iptables -N fail2ban-apache
    iptables -A fail2ban-apache -j RETURN
    iptables -I INPUT -p tcp --dport http -j fail2ban-apache returned 400
    2008-01-27 13:06:46,352 fail2ban.actions.action: ERROR  iptables -N fail2ban-courierimap
    iptables -A fail2ban-courierimap -j RETURN
    iptables -I INPUT -p tcp --dport imap2 -j fail2ban-courierimap returned 400
    2008-01-27 13:06:46,352 fail2ban.actions.action: ERROR  iptables -N fail2ban-sasl
    iptables -A fail2ban-sasl -j RETURN
    iptables -I INPUT -p tcp --dport smtp -j fail2ban-sasl returned 400
    2008-01-27 13:06:46,353 fail2ban.actions.action: ERROR  iptables -N fail2ban-courierpop3
    iptables -A fail2ban-courierpop3 -j RETURN
    iptables -I INPUT -p tcp --dport pop3 -j fail2ban-courierpop3 returned 400

Share This Page