Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Securing Access to a Linux Server

Oracle Tips by Burleson Consulting

26 May 2005
John Garmany

 Lately I have been dealing with security issues with Application Servers and Databases on Linux Servers.  Most Oracle users use Red Hat, with SUSE following close behind.  Many have development or test servers running FC2/3 or some other Linux distribution.  All of these operating system install in a mode that provides some pretty good security.  Oracle backs up the security of it's products whether it is Web Cache, Oracle HTTP Server (OHS) or the database Listener.  These are the three products normally exposed to the Internet and it is rare to find a breach allowed through any of them.

Normally, the breach is due to BAD PASSWORDS!

The easiest way to get onto the database or the server is to guess the password.  Poor, easily guessed passwords provide the hacker with the entry point. 

Here I want to focus on a security hole in the Linux OS, ssh or the secure shell.  Again the problem is not that ssh is insecure, but that by default it relies on passwords.

The problem with passwords is; if they are easy, they are easy to break, if they are too difficult, the user will write them down somewhere.  You have to find a happy medium, a mix of upper and lower case, numbers and letters that do not spell actual words.

Note to DBA:  oracle/oracle is a bad username/password!

Since ssh is a standard shell for UNIX and Linux, most attacks against it have been automated.  An attacker finds your computer, checks port 22 and finds ssh.  He then tries a set of common passwords and given enough time will eventually break an easy password.

How common is this type of attack?  My home server acts as my mail gateway and runs Linux.  During a three week period about a month ago, my server averaged over 500 attempts to log in as root per day!

Recently a client had a performance issue on a file server and found a root user upgrading operating system packages.  It tuned out that not only had a hacker gotten root privileges on the box, but was actually upgrading the OS to support his new zombie tools.

So what do you do?

1.  Don't open port 22 to the internet unless you need that capability.  I only open that port when someone is logging onto the server from outside the firewall.  Otherwise that port stays protected behind the firewall.

2. Do not allow anyone to log onto the server as root.  This is an easy fix. 
Edit the file /etc/ssh/sshd_config and set "PermitRootLogin no".  Restart the service with
# service ssh restart

This will force users who need root access to log on as an unprivileged account and su to root.

3.  Stop using passwords and go to Public Key Authentication.  This is a little more complicated.  Using your ssh client (ssh, SecureCrt, putty. etc) generate a public and private key.  Place the public key on the server for each user.  In the /etc/ssh/sshd_config file set:
 

PubkeyAuthentication yes
PasswordAuthentication no

This will allow the use of keys and disallow the use of password.  Now the hacker can guess passwords forever.  You aren't using them.

Note: not all keys are the same and some require conversion to work with Linux's OpenSSH.  SecureCrt keys must be converted.  See the documentation for your ssh client to determine it your keys need to be converted.

Make sure your keys contain a passphrase to keep someone from sitting down at your computer and using you private key.

4.  Lastly, keep your system up to date.  When a hole is found in ssh, the community (or distributor) will release an update to close the hole.  You do not have to update the entire OS, but you should keep any program that touches the Internet updated.

Bottom line:  Protect your data!  Don't allow access to the Internet unless necessary.  Use difficult to guess passwords or public key authentication.

Remember, if I can log onto your server as root, I can su to oracle and log onto your database
as "/ as sydba".
 

Don't make it easy!

 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational