| Linode Forum https://forum.linode.com/ |
|
| iptables - is this a good ruleset? https://forum.linode.com/viewtopic.php?f=19&t=3352 |
Page 1 of 1 |
| Author: | cattani [ Sat Jun 28, 2008 2:29 pm ] |
| Post subject: | iptables - is this a good ruleset? |
is this a good ruleset for a server that has to block anything but http,https,smtp,imap,ssl,openvpn (i xxx´ed ssl and openvpn as i put them on non-standard ports which helped a lot against some idiots attacks)? the two subnets i blocked additionally where bugging me with continous relay trials. i am asking, because i am not sure about teh forwarding rules and those lines i posted at the end. thx! Code: Chain INPUT (policy ACCEPT) Code: # Generated by webmin --> dont know thy webmin is adding this, i never use webmin to configure iptables... |
|
| Author: | irgeek [ Sat Jun 28, 2008 7:02 pm ] |
| Post subject: | |
I will preface this by saying that I don't bother with iptables--I just don't have services listening on ports I don't want open. However, after a quick glance at the ports you have open I'd suggest two things completely unrelated to iptables: 1) Configure your SMTP server with TLS and AUTH and have it listen on the submission port (587). There are a lot of ISPs in the world that block outbound connections on port 25. I have yet to encounter one that blocks submission, but just as a safeguard I also have Postfix listen on port 2525 in case I find one someday. This will allow users to send email from anywhere without issues. 2) I noticed you have a service listening on the imap port. I would strongly recommend enabling TLS for imap as well since, without it, everything goes across the wire in the open. This may not seem like a problem, but if your users are like mine they sometimes do email from Internet cafes and places like that. TLS will ensure that a malicious user can't intercept that data. TLS, obviously, requires a certificate. If you have a small enough number of users you can use a self-signed certificate and distribute it to them. If you have more than a handful of users, there are several places that will supply you a certificate for very little money. I use namecheap.com for my domains and I have heard good things about their certificates. Anyway, I don't really have anything to add to your iptables rules, but securing services is a pretty good idea. --James |
|
| Author: | MrRx7 [ Sun Jun 29, 2008 2:14 pm ] |
| Post subject: | |
Mine is a bit restrictive, but I only have 2 services that need external access, the below code is just the rules for dropping bad packets to protect the server Code: Chain bad_tcp_packets (1 references) the fail2ban-ssh chain was setup by fail2ban, which I highly recommend installing. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|