Live data from Hacker News

Securing a Linux Server

spenserj.com

1–10 of 143 posts

Re: Securing a Linux Server

#2
This is a good start, netstat -an to see what ports are open, to shut down things that open ports. Turn of xinetd if it is on, etc. There was a much more complete best practices document that came through here earlier.

Re: Securing a Linux Server

#7
post #2

This is a good start, netstat -an to see what ports are open, to shut down things that open ports. Turn of xinetd if it is on, etc. There was a much more complete best practices document that came through here earlier.

netstat -an shows a lot of stuff. I think here all you need is

netstat -ntul

(Thanks "child", I did indeed initially not have the -u there. You should.)

Re: Securing a Linux Server

#8
Very useful for any Linode user.. Compare to AWS, I find it hard to manage security on Linode boxes.. Need concept of security groups like AWS configurable and manageable from UI..

Re: Securing a Linux Server

#9
post #7
post #2

This is a good start, netstat -an to see what ports are open, to shut down things that open ports. Turn of xinetd if it is on, etc. There was a much more complete best practices document that came through here earlier.

netstat -an shows a lot of stuff. I think here all you need is netstat -ntul (Thanks "child", I did indeed initially not have the -u there. You should.)

Better yet, netstat -nltu (--numeric --listening --tcp --udp). You probably want to shut down anything unwanted that binds an udp-socket too.

Re: Securing a Linux Server

#10
I made the mistake of accidentally setting the firewall too strict on a remote server, killing my ability to SSH. A neat little trick I found was to setup a scheduled task to kill the firewall in 5 minutes, and then restart it. If it's too restrictive and locks you out, wait 5 minutes. If you did it right, then kill the scheduled task.
Post reply on HN