LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-27-2021, 06:18 PM   #1
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,679
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
"Number of unauthorized access attempts: Zero."


Most people depend on ssh to provide a necessary "back door" into the various systems that they are responsible for. However, often within a matter of minutes, they find that their server logs are pounded with "unauthorized access attempt" messages that are coming from literally everywhere on earth. Somehow, they discovered that your IP-address existed, and that you were running sshd on it. They promptly began firing torpedoes. And, they will never stop.

There is, however, "a better way," and that "better way" is OpenVPN, using digital certificates and tls-auth. You pre-supply each authorized accessor ... such as yourself ... with a pair of digital credentials that can never be "hacked." You place this as an outer perimeter through which everyone must pass to reach anything "jucier." Then, you make it ... invisible!

(Necessarily, the remainder of this post is an introduction ... to ideas expounded upon by a legion of Internet posts.)

OpenVPN acts as "a secure TCP/IP router, implemented in software." It acts as a gateway to your "internal" network, including your sshd server. All of these services expose themselves only to the internal network – none to the outside world. Therefore, to reach any of it, you must "pass through the gateway door." However, it now becomes ... a secret(!!) door. If you are authorized to enter it, you pass right through. If not, you cannot discover(!!) that it even exists.

Unlike sshd, OpenVPN uses the "udp" layer of networking to communicate – so, there are no ("tcp/ip" ...) sockets to detect. "Port scans" fail because: there are no ports. Your opponent is forced to "shoot datagrams into the dark," and it literally cannot discover that your OpenVPN server is even present, unless that server responds. And, this is where tls-auth comes in.

tls-auth installs a "outside the portcullis, and beyond the drawbridge" layer of defenses. Unless the supplicant can demonstrate that it possesses the (separate ...) "tls-auth digital certificate," the server won't even answer. Which means that an intruder can never discover that "the secret door" exists, let alone attempt to enter it.

In this way, the "number of unauthorized access attempts" instantly drops to zero. They don't bother your sshd server simply because they can never get that far. Because the server exposes itself only to the internal network, not the public internet.

digital certificates, available only to those who managed to pass the drawbridge and the porticullis, are the next equally-impenetrable line of defense. "Either you possess a [unique ...] cryptographic key, which has not been individually revoked, or you do not."

Only if you successfully "establish the tunnel" in this way do you ever first get the chance to use the ssh command ... nor, anything else. (Likewise, perhaps, to "connect to some internal website.")

So ... here is a strategy that is simultaneously impenetrable and(!) convenient. Authorized users, possessing both keys, pass swiftly through the drawbridge and the portcullis without realizing that it is even there. Meanwhile, the legions of automated attackers pass it by – also never realizing that it is there.

... and your "security log" is deserted.

Last edited by sundialsvcs; 04-27-2021 at 06:24 PM.
 
Old 04-29-2021, 12:50 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
You have been advertising this a few times already in the past decade.
We still remember.
Something about dwarves and the Lord of the Rings.
And since this isn't an actual tutorial or anything... what's the point (no don't answer that, it's a rhethorical question).

Personally, I wish people wouldn't
a) make a big show out of leaving a forum
b) come back anyhow, just to repeat their old spiel
...
 
Old 05-04-2021, 01:16 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,679

Original Poster
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
Be that it may, this is still the most common situation that I encounter. If you get a "bots" hammering away at you, you can have hundreds of attempts per second, 24/7 and that siphons away a lot of resources. Not to mention megabytes of space in the security log file. Then, it ... "stops."
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Woo-hoo! My first "blog post": "Number of Unauthorized Access Attempts: ZERO" sundialsvcs Linux - Security 3 05-11-2017 08:27 PM
UnrealIRCd Backdoor Unauthorized Access Vulnerability bathory Linux - Security 1 06-15-2010 06:58 AM
Auto mail generates for unauthorized Access shipon_97 Linux - Newbie 1 07-04-2006 07:15 AM
How do I block IP's to prevent unauthorized SSH login attempts? leofoxx Linux - Security 6 05-23-2005 09:36 PM
unauthorized client cant access my DHCP server selfnet Linux - Networking 2 04-28-2005 05:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration