Question

Do I need antivirus for my Ubuntu server?

Asked by: mrcoulson

I have a web server running Ubuntu Server. It isn't running a GUI.  I use FTP to put files on it.  I use PuTTY to administer it.  I use SQLyog to administer MySQL.  What antivirus measures should I be taking?  It's not production yet, but it may be soon.

Are there other security measures to be taking?

Jeremy

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-09-02 at 20:21:47ID24703501
Tags

Ubuntu

,

Linux

,

antivirus

Topics

Linux Network Security

,

Ubuntu

,

Server Anti-Virus

Participating Experts
4
Points
500
Comments
39

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

    Free Tech Articles

    1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
      It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
    2. SCCM OSD Basic troubleshooting
      SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
    3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
      This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
    4. Create a Win7 Gadget
      This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
    5. Outlook continually prompting for username and password
      There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
    6. Backup Exchange 2010 Information Store using Windows Backup
      There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

    Cloud Class Webinars

    1. Avoiding Bugs in Microsoft Access
      Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
    2. Top 10 Best New Features in Visio 2010
      Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
    3. IT Consultant Business Secrets Revealed
      Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
    4. Disaster Recovery and Business Continuity
      Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
    5. Organize Your Visio Diagrams with Containers and Lists
      Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
    6. How to Us Objects, Properties, Events and Methods in Microsoft Access
      Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

    Join the Community

    Give a Little. Get a Lot.

    Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

    Join the Community

    Answers

     

    by: travis87Posted on 2009-09-02 at 20:50:05ID: 25247729

    That is a community question, like does a MAC need anti-virus.  The answer may lie in what you are using it for.  If it will be a public server it will be at a higher risk for any attack than a private server.

    At the end of the day they make Anti-virus for Ubuntu, so it is suseptable to attack.  What your threat level is depends on your setup.  Anything can be attacked, including Anti-Virus programs.

    Here is an AVG discusion about this topic: https://help.ubuntu.com/community/Antivirus/Avg

     

    by: mrcustardPosted on 2009-09-02 at 21:28:36ID: 25247881

    There aren't any "REAL" threats as far as viruses go for a Linux server. There are however vulnerabilities that can be exploited if you aren't paying attention.

    Here's what we do:

    1. Make sure only the software that is absolutely required is installed on the server. This can be difficult because some pieces of software are installed because another piece of software requires it's libraries. Refer to #2
    2. Make sure that only the services that are required for the server to do it's job are running. For example if you don't need CUPS (Print Server) - disable it.
    3. Monitor the vulnerabilities of the services that you are running closely and update quickly. This becomes increasingly difficult with an application - as updates tend to break application code
    4. Firewall if you are running something like SSH - try to have your firewall administrator source restrict where ever possible. For example you are only going to allow XYZ.com to access the SSH server, all other traffic is denied. You should also configure the servers firewall (iptables) to act as a secondary firewall in the case that someone gets past the main hardware firewalls - this way your machines have an extra layer of protection. Restrict what the server can do as well - either by iptables, hardware firewall or both. This way if the server does get compromised, it will be limited in what it can actually do from the inside of your network out.
    5. turn on logging - by default if someone is trying to SSH to the server and is failing, SSH will log the failed attempts, you will need to turn up the systems accounting to track users who actually have access.

    Hope this helps!

     

    by: eokePosted on 2009-09-03 at 01:13:53ID: 25248677

    Hi mrcoulson,

    If you're going to have Windows clients accessing files on the server then you should certainy consider it as it's another avenue by which viruses could spread between your Windows clients.

     

    by: mrcustardPosted on 2009-09-03 at 07:29:05ID: 25251016

    I must concede that if you are using the Linux server as a way to transfer files - a virus could be transmitted from one Windows host to another Windows host if they are picking up the same EXE file.

    My comment however, was centered around the fact that a Linux server by default will not pass a Windows virus from Linux server to Linux server because unlike Windows, executable files aren't magically executable if they have an EXE extension. They must have the proper permissions set to be an "Executable" file. You could also use ClamAV to scan files as they come into your FTP server.

     

    by: _jesper_Posted on 2009-09-03 at 09:24:37ID: 25252251

    Some thoughts:

    1) keep Apache upgraded

    2) use a non-privileged user for Apache with a shell of /bin/false

    3) install modsecurity for Apache and get the supplemental snort rules

    4) if you use php, read and use all security measures

    5) configure iptables

    6) use an ftp server (like pure-ftpd) that will chroot users to their respective home directories

    7) use paranoid umask settings on ftp uploads

    8) consider Norman or Clam if you want to on demand or scheduled scan files

    9) don't allow remote users to have a shell.  again use /bin/false

     

    by: mrcoulsonPosted on 2009-09-03 at 09:32:03ID: 25252336

    Wow, I installed Clam, but the update process is failing like a pro.  See below.

    Jeremy

    Trying host database.clamav.net (64.246.134.219)...
    connect_error: getsockopt(SO_ERROR): fd=4 error=111: Connection refused
    Can't connect to port 80 of host database.clamav.net (IP: 64.246.134.219)
    WARNING: getpatch: Can't download main-51.cdiff from database.clamav.net
    Retrieving http://database.clamav.net/main-51.cdiff
    connect_error: getsockopt(SO_ERROR): fd=4 error=111: Connection refused
    Can't connect to port 80 of host database.clamav.net (IP: 207.57.106.31)
    Trying host database.clamav.net (64.246.134.219)...
    connect_error: getsockopt(SO_ERROR): fd=4 error=111: Connection refused
    Can't connect to port 80 of host database.clamav.net (IP: 64.246.134.219)
    Trying host database.clamav.net (168.143.19.95)...
    connect_error: getsockopt(SO_ERROR): fd=4 error=111: Connection refused
    Can't connect to port 80 of host database.clamav.net (IP: 168.143.19.95)
    WARNING: getpatch: Can't download main-51.cdiff from database.clamav.net
    Retrieving http://database.clamav.net/main-51.cdiff
    connect_error: getsockopt(SO_ERROR): fd=4 error=111: Connection refused
    Can't connect to port 80 of host database.clamav.net (IP: 64.246.134.219)
    Trying host database.clamav.net (168.143.19.95)...
    connect_error: getsockopt(SO_ERROR): fd=4 error=111: Connection refused
    Can't connect to port 80 of host database.clamav.net (IP: 168.143.19.95)
    Trying host database.clamav.net (207.57.106.31)...
    connect_error: getsockopt(SO_ERROR): fd=4 error=111: Connection refused
    Can't connect to port 80 of host database.clamav.net (IP: 207.57.106.31)
    WARNING: getpatch: Can't download main-51.cdiff from database.clamav.net
    WARNING: Incremental update failed, trying to download main.cvd
    Whitelisting short-term blacklisted mirrors
    Retrieving http://database.clamav.net/main.cvd
    connect_error: getsockopt(SO_ERROR): fd=4 error=111: Connection refused
    Can't connect to port 80 of host database.clamav.net (IP: 168.143.19.95)
    Trying host database.clamav.net (207.57.106.31)...
    connect_error: getsockopt(SO_ERROR): fd=4 error=111: Connection refused
    Can't connect to port 80 of host database.clamav.net (IP: 207.57.106.31)
    Trying host database.clamav.net (64.246.134.219)...
    connect_error: getsockopt(SO_ERROR): fd=4 error=111: Connection refused
    Can't connect to port 80 of host database.clamav.net (IP: 64.246.134.219)
    WARNING: Can't download main.cvd from database.clamav.net
                                                  
    1:
    2:
    3:
    4:
    5:
    6:
    7:
    8:
    9:
    10:
    11:
    12:
    13:
    14:
    15:
    16:
    17:
    18:
    19:
    20:
    21:
    22:
    23:
    24:
    25:
    26:
    27:
    28:
    29:
    30:
    31:
    32:
    33:
    34:
    35:
    36:
    

    Select allOpen in new window

     

    by: _jesper_Posted on 2009-09-03 at 09:57:35ID: 25252567

    Is this the latest version?

    clamscan -V
    freshclam -V

     

    by: mrcoulsonPosted on 2009-09-03 at 09:59:03ID: 25252577

    ClamAV 0.95.1/9213/Wed Apr  8 08:41:44 2009

    Hmmm.  Old enough to matter?

    Jeremy

     

    by: mrcoulsonPosted on 2009-09-03 at 10:00:20ID: 25252592

    Website tells me the latest stable release is 0.95.2.

    Jeremy

     

    by: _jesper_Posted on 2009-09-03 at 10:13:18ID: 25252739

    I wouldn't think so.  Can you try the latest release?  If that still fails, we can further trouble it.

     

    by: mrcustardPosted on 2009-09-03 at 10:42:27ID: 25253007

    I assume that the machine you are working on has the ability to connect to sites via port 80? In other words no firewalls preventing the system from going out?

     

    by: mrcoulsonPosted on 2009-09-03 at 11:36:20ID: 25253552

    Well, I don't know.  To get out, I have to use an HTTP proxy.  I did this earlier:

    export http_proxy=http://user:pass@proxy:port/
    apt-get update

    Not good enough?  Wrong way to set the proxy on my server?

    Jeremy

     

    by: mrcustardPosted on 2009-09-03 at 11:38:51ID: 25253578

    The proxy that you set was only for the OS (from what I can tell - based on your post). Look for a way to add a proxy in ClamAV

     

    by: _jesper_Posted on 2009-09-03 at 11:39:39ID: 25253587

    That's the problem.  Clam doesn't know about the proxy.

     

    by: mrcustardPosted on 2009-09-03 at 11:41:20ID: 25253605

     

    by: mrcoulsonPosted on 2009-09-03 at 13:09:48ID: 25254429

    Okay, I edited the conf file and ran freshclam with this result:

    WARNING: Insecure permissions (for HTTPProxyPassword): /etc/clamav/freshclam.conf must have no more than 0700 permissions.

    Do I just need to chmod that file or something?

    Jeremy

     

    by: mrcoulsonPosted on 2009-09-03 at 13:19:16ID: 25254518

    chmod 700 /etc/clamav/freshclam.conf resulted in "can't open/parse the config file".

    Jeremy

     

    by: mrcoulsonPosted on 2009-09-03 at 13:21:07ID: 25254540

    By the way, I use ClamXAV on my Mac and it updates just fine here at work -- of course, that's with a nice GUI and a very clear text box into which I can enter my proxy info.

    Jeremy

     

    by: mrcustardPosted on 2009-09-03 at 13:51:54ID: 25254813

    can you take a look at the freshclam.conf file on your Mac? How about the permissions.

    Can you try chmod 600

     

    by: mrcoulsonPosted on 2009-09-03 at 15:19:02ID: 25255501

    I had actually tried 600 at first by accident.

    There doesn't seem to be a freshclam.conf in ClamX.

    Jeremy

     

    by: mrcustardPosted on 2009-09-03 at 15:46:42ID: 25255655

    Ok ... so it needs to be owned by the user who will be running it ... and it should have the following permissions:

    -rw-r--r--

     

    by: mrcoulsonPosted on 2009-09-03 at 15:54:08ID: 25255707

    -rw-r--r-- 1 clamav adm 812 2002-01-28 02:40 freshclam.conf

    Okay, it appears a user called clamav owns the file.  Should I change that to me (jcoulson)?  Or root?  Or should I log in as clamav (even though I don't know what that password would be)?

    Jeremy

     

    by: mrcoulsonPosted on 2009-09-03 at 15:56:44ID: 25255726

    I made root the owner and now I'm getting the "must have no more than 0700 permissions" error even though I've set it to 644.

    Frustrating.

    Jeremy

     

    by: mrcustardPosted on 2009-09-03 at 15:57:05ID: 25255731

    The permissions are correct - don't change them you are trying to start this as a service ... which will then start it as the clamav user

     

    by: mrcustardPosted on 2009-09-03 at 15:58:47ID: 25255742

    Actually try this:

    change the permissions to: -r--r--r-- which will make it a read only file - the command would be:

    chmod -w freshclam.conf

     

    by: mrcustardPosted on 2009-09-03 at 16:01:18ID: 25255761

    Ok ... it can't be owned by root as that will mostlikely cause all kinds of problems - it must be owned by the clamav, with the group adv then change to 644 or 444.

     

    by: mrcoulsonPosted on 2009-09-03 at 16:08:07ID: 25255805

    Here's what I just did.  I didn't change the group.  I wasn't sure how to tell what it is to put it back if I need to.

    root@ITGLINUXWEB:/etc/clamav# chown clamav freshclam.conf
    root@ITGLINUXWEB:/etc/clamav# chmod 644 freshclam.conf
    root@ITGLINUXWEB:/etc/clamav# ls -l freshclam.conf
    -rw-r--r-- 1 clamav adm 812 2002-01-28 02:40 freshclam.conf
    root@ITGLINUXWEB:/etc/clamav# freshclam -v
    WARNING: Insecure permissions (for HTTPProxyPassword): /etc/clamav/freshclam.conf must have no more than 0700 permissions.
    root@ITGLINUXWEB:/etc/clamav# ls -l freshclam.conf
    -rw-r--r-- 1 clamav adm 812 2002-01-28 02:40 freshclam.conf
    root@ITGLINUXWEB:/etc/clamav# chmod 444 freshclam.conf
    root@ITGLINUXWEB:/etc/clamav# ls -l freshclam.conf
    -r--r--r-- 1 clamav adm 812 2002-01-28 02:40 freshclam.conf
    root@ITGLINUXWEB:/etc/clamav# freshclam -v
    WARNING: Insecure permissions (for HTTPProxyPassword): /etc/clamav/freshclam.conf must have no more than 0700 permissions.

    Jeremy

     

    by: mrcustardPosted on 2009-09-03 at 16:14:49ID: 25255836

    Well from what i've seen online 600 should work. Also this is only a warning is clam running?

     

    by: mrcoulsonPosted on 2009-09-03 at 16:15:49ID: 25255844

    I suppose.  It's definitely not updating, though.

    Jeremy

     

    by: mrcustardPosted on 2009-09-03 at 16:24:11ID: 25255885

    I have one more thing I need to look at - give me a few minutes.

     

    by: mrcoulsonPosted on 2009-09-03 at 16:27:55ID: 25255906

    No sweat.  I'll start the kids on their bath and let my laptop get a little juice in its battery.

    Jeremy

     

    by: mrcustardPosted on 2009-09-03 at 16:28:51ID: 25255911

     

    by: mrcoulsonPosted on 2009-09-03 at 19:06:17ID: 25256473

    I suppose I'm confused as to how to implement this solution.

    config setprop clamav HTTPProxyPassword secret
    expand-template /etc/freshclam.conf
    freshclam -v

    If I just type in the first line and hit "enter", I'm told "config: command not found".

     

    by: mrcustardPosted on 2009-09-03 at 19:48:20ID: 25256572

    Oddly enough I was actually able to get past the warnings, etc ... and attempt to update by doing this:

    chmod 000 /etc/freshclam.conf <-- this shouldn't be right at all ... as the freshclam executable shouldn't even work at this point.

    then went back in and set the permissions to 600, and it still works. Mine is also running as root so chmod

    Give that a try -

     

    by: mrcoulsonPosted on 2009-09-03 at 21:54:25ID: 25256937

    Awesome!  Now it appears to be getting out past the proxy!

    Wait...my joy is short-lived.

    WARNING: getfile: Unknown response from remote server (IP: 10.18.231.232)
    WARNING: getpatch: Can't download main-51.cdiff from db.local.clamav.net

    I feel like a retard.

    Jeremy

     

    by: mrcustardPosted on 2009-09-03 at 21:59:29ID: 25256956

    Unfortunately I can't help you with that - that should be a result of something their server is doing ... it may be that they are down for maintenance or something.

     

    by: mrcoulsonPosted on 2009-09-04 at 03:16:33ID: 25258083

    Well, it's still happening.  I'm pretty sure the probability that Clam's servers are down for maintenance is much smaller than the probability that I just don't know what I'm doing and I've screwed something up.

    Jeremy

     

    by: mrcoulsonPosted on 2009-09-04 at 05:59:15ID: 25259080

    I commented out the line about looking on my Ubuntu CD for apt-get and now I can't get any packages.  I'm guessing that the core of the problem is that I haven't set my proxy up correctly and I've only been able to use apt-get thus far because I have left the CD in the server.  Poo.

    Jeremy

     

    by: mrcoulsonPosted on 2009-09-18 at 13:19:09ID: 25369633

    The solution here was to put the server outside the proxy with an external IP address.

    Jeremy

    20120131-EE-VQP-002

    3 Ways to Join

    30-Day Free Trial

    The Experts

    98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

    He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

    The Experts

    97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

    The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

    Testimonials

    "...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

    Testimonials

    "I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

    Testimonials

    "WOW! You guys have great, active, and knowledgeable people on here." moore50

    Business Clients

    Business Clients

    In the Press

    "If you’ve got a question... Experts Exchange can supply an answer.”

    In the Press

    "...an invaluable aid for both IT professionals and those who require tech support."

    In the Press

    "where IT professionals provide quick answers on just about any topic"

    Business Account Plans

    Loading Advertisement...