Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have been getting a little frustrated with trying to setup iptables firewall rules for my new webserver. I am new at this and basically need only a few services accessible, this is a public webserver that is going to be pounded on alot, I am working through ssh only so I have been looking for a script. A few of my challenges are this, I am running multiple sites as I am hosting, I need ssh, ftp, mail, and http - https services available. The thing is I have read through iptables setups, but I am used to hardware firewall, so the difference is alot haha. I see alot of scripts online for office firewalls but havent found much for webservers. If you guys have any suggestions besides google LoL I would be much appreciative, Thanks, Frog
IPTables has a lot of options, but you can ignore most of them. Feeding this in with iptables-restore provides a basic configuration with SSH, HTTP and HTTPS access, and you can add ports just by specifying extra lines for the relevant port numbers:
# Set the default policies: ACCEPT outbound connections, and DROP all others
:INPUT DROP [3342:147048]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [526:34970]
# Accept anything from the loopback interface
-A INPUT -i lo -j ACCEPT
# Accept responses to connections that this system initiated
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
# Accept pings
-A INPUT -i eth0 -p icmp -j ACCEPT
# Accept SSH connections
-A INPUT -i eth0 -p tcp -m tcp --dport 22 -j ACCEPT
# Accept HTTP connections
-A INPUT -i eth0 -p tcp -m tcp --dport 80 -j ACCEPT
# Accept HTTPS connections
-A INPUT -i eth0 -p tcp -m tcp --dport 443 -j ACCEPT