Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
I'm building up from a clean install and was wondering if the rules listed below are secure for a dedicated web server (only one nic). First time and just wanted to confirm...
// DROP everything by policy
iptables -p INPUT DROP
iptables -p OUTPUT DROP
iptables -p FORWARD DROP
// ACCEPT all internal traffic on loopback
iptables -A OUTPUT -j ACCEPT -o lo
iptables -A INPUT -j ACCEPT -i lo
ridertech:
Do you need outbound ssh/http/https?
Otherwise you could skip that as well.
As a replacement for ftp I suggest you use sftp which is included in the ssh suite.
Although this will not work if you're planning on setting up an anonymous ftp server (which is usually a bad on any server running anything but just the ftp daemon)
I've seen a php script called Jabba's PHP Traverser, which gives read access via a web interface, to directories of your choice.
I have no idea if this is a secure solution, but it might be a good idea to check it out if only read access is required...
In addition, you may want to filter your incoming SSH connections to just the sites that you will be connecting from. Right now anyone with a client can make an attempt to login.
Also, I've been seeing examples of scripts that setup the firewall upon boot, rather than entering these rules in line by line. Assuming that the syntax is the same, where do I put the file and how does the script get run? What happens if the script is not found for some reason, will the firewall be completely open?
I never liked the initial config file for iptables, was always hard to read, so I created this. I have it residing in my /etc/init.d, it's called iptables, that way I didn't have to create any link to actually start it up. Otherwise you'll have to make a link like per normal startup script.
Anyway, if you have any questions about it, let me know.
Last edited by Technoslave; 01-03-2004 at 12:55 AM.
you can just make a script and have all your lines of iptables in it, and then just add a refernce to your script in your rc.local . Personnaly i like doing it this way, because it gets run last. And you know exactly whats been loaded and when.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.