Question about Whitelisting and Blacklisting

Issues related to configuring your network
Post Reply
Mike_Rochefort
Posts: 215
Joined: 2016/03/16 02:34:19

Question about Whitelisting and Blacklisting

Post by Mike_Rochefort » 2017/05/13 00:01:32

At my university I'm going to be managing some servers that will be used as licensing servers, version control, and render nodes. As I want to restrict these to on campus access only, what would be the best course of action?

One of my biggest questions comes from the idea of whitelisting and blacklisting. In the few desktops I've been testing on I've had to repeatedly blacklist IP's that were attempting to SSH into the machines before completely disabling SSH. Will whitelisting the CIDR ranges that the campus is registered with blacklist all other IP's automatically, or is there a rule I need to add to blacklist all IP's on top of the whitelisted IP's?

Thanks in advance!
Solution Architect @RedHat | RHCE
Former SysAdmin @BlueSkyStudios and @Pixar
Feature animation and VFX enthusiast
--
Report CentOS Stream 8 bugs: https://da.gd/c8s-bugs
Report CentOS Stream 9 bugs: https://da.gd/c9s-bugs

Mike_Rochefort
Posts: 215
Joined: 2016/03/16 02:34:19

Re: Question about Whitelisting and Blacklisting

Post by Mike_Rochefort » 2017/05/13 04:19:43

I now realize what a dumb question this was due to a misunderstanding with whitelists and blacklists.

As a broader question, do I need to worry about the work, home, etc subsections of the firewall rules or will public work just fine?
Last edited by Mike_Rochefort on 2017/05/13 12:56:48, edited 1 time in total.
Solution Architect @RedHat | RHCE
Former SysAdmin @BlueSkyStudios and @Pixar
Feature animation and VFX enthusiast
--
Report CentOS Stream 8 bugs: https://da.gd/c8s-bugs
Report CentOS Stream 9 bugs: https://da.gd/c9s-bugs

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Question about Whitelisting and Blacklisting

Post by TrevorH » 2017/05/13 09:38:40

Mostly the recommendation for securing ssh is to leave it open to as few ip addressees as possible but to disable password logins and require key nased access. That stops password brute forcing bots in their tracks.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Mike_Rochefort
Posts: 215
Joined: 2016/03/16 02:34:19

Re: Question about Whitelisting and Blacklisting

Post by Mike_Rochefort » 2017/05/13 13:08:06

Thank you for the response Trevor, always appreciate what you do!

For the IP limiting in ssh, I take it you mean something like this?

https://coderwall.com/p/yz-2_a/limit-ss ... ip-address


As for the key management, how would you go about doing that? I've only ever used keys for GitHub/GitLab, so managing them for access is something I've never done before.
Solution Architect @RedHat | RHCE
Former SysAdmin @BlueSkyStudios and @Pixar
Feature animation and VFX enthusiast
--
Report CentOS Stream 8 bugs: https://da.gd/c8s-bugs
Report CentOS Stream 9 bugs: https://da.gd/c9s-bugs

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Question about Whitelisting and Blacklisting

Post by TrevorH » 2017/05/13 15:12:11

I'd use iptables to restrict you can reach your machine. Pretty sure there is an article in the wiki about securing ssh.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Mike_Rochefort
Posts: 215
Joined: 2016/03/16 02:34:19

Re: Question about Whitelisting and Blacklisting

Post by Mike_Rochefort » 2017/05/13 15:17:31

I've used firewalld to set up global rich rules in the past, as I thought it was the intended way forward for CentOS/RHEL. I thought you were saying to setup a second set of IP's specific to ssh on top of this.

Is there any advantage of iptables over firewalld, or is it just more common / user friendly? I'll take a look in the wiki for the SSH topic.
Solution Architect @RedHat | RHCE
Former SysAdmin @BlueSkyStudios and @Pixar
Feature animation and VFX enthusiast
--
Report CentOS Stream 8 bugs: https://da.gd/c8s-bugs
Report CentOS Stream 9 bugs: https://da.gd/c9s-bugs

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Question about Whitelisting and Blacklisting

Post by TrevorH » 2017/05/13 16:22:57

Pretty sure firewalld is just a wrapper on top of iptables. Personally I'm not a fan but it probably has its use cases. The idea I think was to make iptables more use friendly which it sort of does do if you only want to do basic things. Unfortunately, if you want to do something more complicated than just basics then firewalld rapidly becomes more complex than doing the same task manually with ordinary iptables rules.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply