[SOLVED] No real problem yet, I need security for a new server on my Raspberry pi 4
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
No real problem yet, I need security for a new server on my Raspberry pi 4
I'm assuming this is the right place, I recently set up my raspberry pi 4 server installed apache2 php, and now I find out I understand I need some sort of security. Ant suggestions?
Aside from changing the default passwords before setting it out on the net, it is mostly locked down. Firewalls can be an amusing way to spend time but at the end of the day you'll have to let in port 22, 80, and 443. Ports 80 and 443 are where PHP will be available, so that is where you should focus your attention. The main thing there is to ensure that all input is sanitized and validated when writing with PHP or other languages. See the programming concept of tainted data. But if you would like a guide, then the OWASP Top 10 Web Application Security Risks would be a good start.
In addition to these other excellent suggestions, block all incoming ports in your router except for the ones you must have open for the server to function.
Also, you might want to run an AV. In this usage, ClamAV should be suitable.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.