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.
Glad to see you got it working. BTW, another approach could be to stick the alias IP rule(s) at the top, and remove the destination IP from the real IP rules. That way you wouldn't need to worry about changing the rules if the real IP ever changes. Also, in cases such as this I would usually create a dedicated chain for the alias IP, with a DROP or REJECT rule at the end. Just a thought.
Now were you talking about creating another chain for the ftp IP only?
Not sure if I am following you or not...
Yeah, I was talking about creating a chain specifically for packets heading into 192.168.0.60, as that IP was meant to get special treatment. Keep in mind that, when I said that, you had only the INPUT chain, unlike what you have now which is chains for each protocol.
If I was you, I'd probably just stick with two user-built chains - a bad packet one and the alias IP one. But that's just me. That said, even with all the protocol-specific chains you now have, I do see a lot of redundant and unnecessary rules. For example, there's no reason why you would need more than one rule for packets in ESTABLISHED or RELATED states. Also, the RELATED match doesn't directly apply to any of your rules (aside from the FTP one) - so I'm not sure why you are specifying it per-rule.
Quote:
I read in your post you thought this method was more complicated, maybe than it needs to be. But I figure if there is any benefit I will try it.
There are benefits sometimes. Some are technical, others are subjective. For example, if you have a crapload of UDP packets coming into your box (like, say you run a popular video game or DNS server or something), there's no reason why they should have to traverse a bunch of rules which are written to check for bad TCP packets. So having a rule that lets UDP packets bypass all of those TCP packet checks can be a good idea. It's just an example, of course.
As for the subjective benefits, some people find scripts easier to manage with a bunch of chains. Others find them easier to manage without any user-built chains, or with a minimal amount of them. There are differences in the types and purposes of chains people prefer, too. For example, I tend to lean more toward chains made per IP, privilege level, etc. and not so much for traffic type. But like everything, it depends.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.