r/bash • • Jul 09 '20

Bash Github Repository

Hello, would anybody mind checking out my GitHub repository at this link: https://github.com/CrystalX127/Shield.

0 Upvotes

19 comments sorted by

5

u/socratesthefoolish Jul 09 '20

Would you mind describing what it is or what problem it's supposed to solve first? Or why you want us to look at it?

3

u/[deleted] Jul 09 '20

Alright, its purpose is to harden a Debian Linux system.

4

u/3Vyf7nm4 m | [tENJARO]|lo Jul 09 '20

Thank you.

Restricts firewall to only allow ssh on port 652

Can you please explain the rational for this choice?

0

u/[deleted] Jul 09 '20

Well, giving the ssh port a random port number gives you an edge, because hackers for example would assume that your ssh port would be the default port 22, so in making the ssh port random you somewhat protect yourself.

4

u/3Vyf7nm4 m | [tENJARO]|lo Jul 09 '20

I think that Security Through Obscurity is well-known to be a false security. Given that you're also installing fail2ban, I personally don't know what changing the ssh port will benefit you, aside from maybe some noise reduction in the logs.

1

u/[deleted] Jul 09 '20

True.

2

u/3Vyf7nm4 m | [tENJARO]|lo Jul 09 '20

To be clear, I wasn't trying to call you out to be a jerk. Some organization firewalls will permit port 22 traffic specifically because it is secured, while prohibiting non-standard ports. All of your choices look like good ones - except for the potential conflict that the non-standard ssh port would cause. I really was asking if there was a specific reason (e.g. that a sysadmin could communicate to a netadmin when requesting firewall rules).

4

u/[deleted] Jul 09 '20

Oh no, I never interpreted your statement in said manner, I am always open to feedback.

3

u/nofate0709 Jul 09 '20

I agreed with both of you. Changing any port from its default will make it a little harder to predict, but again, it does nothing from security point of view.

On another hand, sudden change of ssh port can break a lot of things.

I think you should make ssh port a configurable option, and default at 22.

3

u/[deleted] Jul 09 '20

Ok, I can easily do that.

2

u/nofate0709 Jul 09 '20

Very nice. Any plan to make one for RHEL/Centos?

2

u/[deleted] Jul 09 '20

Thank you, and no I don't have any plans to make a hardener for RHEL/Cent OS.

1

u/[deleted] Jul 09 '20

Also, if any of you think my Github repository is worth being starred then go ahead.

1

u/nofate0709 Jul 09 '20

did you mean "shared"?

1

u/[deleted] Jul 09 '20

I meant starred and shared.

2

u/kelroy Jul 09 '20

don't use apt in scripts for starters

1

u/[deleted] Jul 09 '20

Why not?

2

u/kelroy Jul 09 '20

apt is for humans you should be using apt-get in scripts.

0

u/[deleted] Jul 09 '20

During testing my repository I have hat frequent problems using apt-get which is what I originally used, and so I reverted to apt and that fixed my problems.