Introduction to Linux Security Introduction to Linux Security Republic Polytechnic Thursday 2 nd  September 2004 By Michael Boman <michael.boman@boseco.com>
What we will cover: Turning off unnecessary servers and services Limit exposure of needed servers and services using IPTables Updating the system Reading Linux log files Q & A
Turning off xinetd launched services Locate the relevant file in /etc/xinetd.d Change “no” to “yes” in the “disable” field Restart xinetd service xinetd restart
Controlling Daemons Temporary turn a daemon off service <daemon-name> stop Permanently removing a daemon from automatically starting at boot up chkconfig –del <daemon-name> Daemons start/stop scripts are stored in /etc/init.d
Who opened that port? Use netstat to locate the application that opened a particular port netstat -tunl -t = tcp -u = udp -n = don't resolve -l = listen only
Limit access to required daemons What can you do when you actually need that service? Bind the service to localhost (ip address 127.0.0.1), if possible Enable IPTables and control access to the particular service
Keeping the system up-to-date All systems becomes vulnerable as time passes and new vulnerabilities are discovered Always keep your system up-to-date to avoid unnecessary time spent on recovering from a intrusion
Linux log files Log files are generally located in /var/log Syslog is the daemon that controls and create the log files Use a tool like “log check” to limit the amount of lines of logs to read through
Advanced Techniques Use a file integrity checker like “tripwire” to keep an eye at changed files Use a Network IDS like “snort” to monitor attacks from the network
Questions? Got any questions? Now is the time to ask them!
Recommended reading material Security Focus www.securityfocus.com Linux Security www.linuxsecurity.org The Linux Documentation Project www.tldp.org IPTables www.netfilter.org Snort Network Intrusion Detection Software www.snort.org

Introduction To Linux Security

  • 1.
    Introduction to LinuxSecurity Introduction to Linux Security Republic Polytechnic Thursday 2 nd September 2004 By Michael Boman <[email protected]>
  • 2.
    What we willcover: Turning off unnecessary servers and services Limit exposure of needed servers and services using IPTables Updating the system Reading Linux log files Q & A
  • 3.
    Turning off xinetdlaunched services Locate the relevant file in /etc/xinetd.d Change “no” to “yes” in the “disable” field Restart xinetd service xinetd restart
  • 4.
    Controlling Daemons Temporaryturn a daemon off service <daemon-name> stop Permanently removing a daemon from automatically starting at boot up chkconfig –del <daemon-name> Daemons start/stop scripts are stored in /etc/init.d
  • 5.
    Who opened thatport? Use netstat to locate the application that opened a particular port netstat -tunl -t = tcp -u = udp -n = don't resolve -l = listen only
  • 6.
    Limit access torequired daemons What can you do when you actually need that service? Bind the service to localhost (ip address 127.0.0.1), if possible Enable IPTables and control access to the particular service
  • 7.
    Keeping the systemup-to-date All systems becomes vulnerable as time passes and new vulnerabilities are discovered Always keep your system up-to-date to avoid unnecessary time spent on recovering from a intrusion
  • 8.
    Linux log filesLog files are generally located in /var/log Syslog is the daemon that controls and create the log files Use a tool like “log check” to limit the amount of lines of logs to read through
  • 9.
    Advanced Techniques Usea file integrity checker like “tripwire” to keep an eye at changed files Use a Network IDS like “snort” to monitor attacks from the network
  • 10.
    Questions? Got anyquestions? Now is the time to ask them!
  • 11.
    Recommended reading materialSecurity Focus www.securityfocus.com Linux Security www.linuxsecurity.org The Linux Documentation Project www.tldp.org IPTables www.netfilter.org Snort Network Intrusion Detection Software www.snort.org