how would i secure freebsd

Discussion in 'Linux & BSD' started by Dark Atheist, Feb 4, 2008.

  1. Dark Atheist

    Dark Atheist Moderator Political User Folding Team

    Messages:
    6,376
    Location:
    In The Void
    all of the guides i used to use are extremely out dated, the server will be running ftp and web, shh also but this will be blocked at the router, can anyone offer me a few sites i could look at?

    Thanks
     
  2. LordOfLA

    LordOfLA Godlike!

    Messages:
    7,027
    Location:
    Maidenhead, Berkshire, UK
    FreeBSD is pretty secure OOB much more so than the popular Centos/Fedora/Suse anyway.

    Make sure that /etc/ssh/sshd_config is set for protocol 2, no root login, not empty passwords.

    You can be super secure with regards root access by installing sudo and configuring trusted users to sudo to root, remove the password on the root account and setting all the TTY's to secure ( I think that disables console root access as well)

    Don't run services you don't need. (FreeBSD runs only ssh and sendmail OOB) disable sendmail from starting by putting sendmail_enable=NONE in /etc/rc.conf.

    Figure out how to configure pf :)
     
  3. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    For a really secure FTP server, use vsftpd, and for web take your pick, i'd personally suggest lighttpd, while it may take a bit longer to get it configured if you are used to Apache (or use a lot of software that requires Apache) it in general scales better and uses less resources.
     
  4. Dark Atheist

    Dark Atheist Moderator Political User Folding Team

    Messages:
    6,376
    Location:
    In The Void
    i use vsftpd already :)
     
  5. Dark Atheist

    Dark Atheist Moderator Political User Folding Team

    Messages:
    6,376
    Location:
    In The Void
  6. LordOfLA

    LordOfLA Godlike!

    Messages:
    7,027
    Location:
    Maidenhead, Berkshire, UK
    dr_death_uae has the best advice :) keep a note of the permissions and flag changes though else updating freebsd builds/versions will fail and break your system.

    Make the permissions/flag changes before setting kern_securelevel.
     
  7. Dark Atheist

    Dark Atheist Moderator Political User Folding Team

    Messages:
    6,376
    Location:
    In The Void
    ok one other thing could using the wrong fdisk command wipe mount points? if so any idea on how to get them back ?