SOLVED Zimbra 8.6 HTTP ERROR 404 Problem accessing /public/error.jsp. Reason: /public/error.jsp

Do a quick search under the usual jetty folders:

find /opt/zimbra/jetty/ -type f -name *jsp -mtime -30

If you find files like:

/opt/zimbra/jetty/webapps/zimbra/js/zimbra/csfe/XZimbra.jsp
/opt/zimbra/jetty/webapps/zimbra/public/Ajax.jsp

you’re actually hacked.

Unlike the previous “zmcat” and “dblaunchs” that actually exploit the vuln and load some sh*t this looks like a bad childish attack. It seems that they delete some files under jetty dir, don’t know why. 
The attack vector is the same, but, there are no strange processes, there is no persistence. Continue reading “SOLVED Zimbra 8.6 HTTP ERROR 404 Problem accessing /public/error.jsp. Reason: /public/error.jsp” »

Share

Setup a Site to Site IPsec VPN With Strongswan and PreShared Key Authentication

Today we will setup a Site to Site ipsec VPN with Strongswan, which will be configured with PreShared Key Authentication.

After our tunnels are established, we will be able to reach the private ips over the vpn tunnels.

Get the Dependencies:
Update your repository indexes and install strongswan:

$ apt update && sudo apt upgrade -y
$ apt install strongswan -y

Set the following kernel parameters:

$ cat >> /etc/sysctl.conf << EOF
net.ipv4.ip_forward = 1 
net.ipv4.conf.all.accept_redirects = 0 
net.ipv4.conf.all.send_redirects = 0
EOF

$ sysctl -p /etc/sysctl.conf

Generate Preshared Key:
We will need a preshared key that both servers will use: Continue reading “Setup a Site to Site IPsec VPN With Strongswan and PreShared Key Authentication” »

Share

Configure Apache With Self-Signed TLS/SSL Certificate on Ubuntu 16.04

Step 1: Generating the certificate

First, let’s create a place to store the file.

mkdir ~/certificates
cd ~/certificates

Generate CSR and private key.

openssl req -x509 -newkey rsa:4096 -keyout apache.key -out apache.crt -days 365 -nodes

It will ask for information for the certificate request. Complete with the appropriate information.

Country Name (2 letter code) [AU]: US
State or Province Name (full name) [Some-State]: FL
Locality Name (eg, city) []: Miami
Organization Name (eg, company) [My Company]: My Company
Organizational Unit Name (eg, section) []:

Common name should be your domain name or the server’s IP address. Also, fill in your email. Continue reading “Configure Apache With Self-Signed TLS/SSL Certificate on Ubuntu 16.04” »

Share

Upgrade PHP version to 7.2 from 7.0 on Ubuntu 16.04

Check your PHP version installed

Before we start, we can simply type the following command to check the existing PHP version installed on the server.

$ php -v

If you installed Ubuntu 16.04 LTS, you will get PHP 7.0.30 installed on your server by running installation script from VestaCP. In this tutorial, we will upgrade our PHP version to 7.2 to enjoy more features and bug fixes.

Check your PHP modules installed

To check installed PHP modules in Ubuntu, type the following command (as Ubuntu makes PHP modules available via packages):

$ dpkg — get-selections | grep -v deinstall | grep php7.0

Remember mark installed modules list, as you need to install them again after upgraded to PHP 7.2. We don’t need to install mcrypt as it has been dropped from PHP 7.2.

In this tutorial, we need to install those modules again: Continue reading “Upgrade PHP version to 7.2 from 7.0 on Ubuntu 16.04” »

Share

Install and setup Plex Media Server Ubuntu 16.04

Plex is a free feature-rich media library platform that provides a way to store all your movies, shows, and other media in one place. You can access Plex from any device, whether you’re at home or on-the-go. There are many different media tools available in the world like, Kodi, Xmbc, OSMC and Mediatomb, but the Plex Media Server is perhaps one of the most popular solutions for managing media. Plex runs on Windows, macOS, Linux, FreeBSD and many more. Plex is a client-server media player system made up from two main components, 1) The Plex Media Server, which organizes music, photos and videos content from personal media libraries and streams it to their player, 2) The Players that can be the Plex web UI, Plex Apps or Plex home theater. Plex Media Server supports Chromecast, Amazon FireTV, Android, iOS, Xbox, PlayStation, Apple TV, Roku, Android TV and various types of smart TVs. If you are looking for a way to watch your movies from anywhere, then Plex is best choice for you.

In this tutorial, we will learn how to install and configure Plex Media Server on Ubuntu 16.04.

Requirements

  • A server running Ubuntu 16.04.
  • A not-root user with sudo privileges setup on your server.
  • A static IP address 192.168.0.227 setup on your server.

Getting Started
Before starting, make sure your system is fully up to date by running the following command:

sudo apt-get update -y
sudo apt-get upgrade -y

Once your system is updated, restart your system to apply all these changes with the following command:

sudo reboot

After restarting, log in with sudo user and proceed to the next step. Continue reading “Install and setup Plex Media Server Ubuntu 16.04” »

Share

Clean up boot partition – Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Case I: if /boot is not 100% full and apt is working
 
1. Check the current kernel version

$ uname -r

It will shows the list like below:

3.19.0-64-generic

2. Remove the OLD kernels

2.a. List the old kernel

$ sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`

You will get the list of images something like below:

linux-image-3.19.0-25-generic
linux-image-3.19.0-56-generic
linux-image-3.19.0-58-generic
linux-image-3.19.0-59-generic
linux-image-3.19.0-61-generic
linux-image-3.19.0-65-generic
linux-image-extra-3.19.0-25-generic
linux-image-extra-3.19.0-56-generic
linux-image-extra-3.19.0-58-generic
linux-image-extra-3.19.0-59-generic
linux-image-extra-3.19.0-61-generic

2.b. Now its time to remove old kernel one by one as Continue reading “Clean up boot partition – Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64” »

Share

Ubuntu old repository add

If you want to continue using an outdated release then edit /etc/apt/sources.list and change archive.ubuntu.com and security.ubuntu.com to old-releases.ubuntu.com.

You can do this with sed:

sudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

then update with:

sudo apt-get update && sudo apt-get dist-upgrade

Sometimes, it might be faster to create backups of your system and reinstall using supported release instead.

Share

Ubuntu repo upgrade from an old unsupported release

If you want to continue using an outdated release then edit /etc/apt/sources.list and change archive.ubuntu.com and security.ubuntu.com to old-releases.ubuntu.com.

You can do this with sed:

sudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

then update with:

sudo apt-get update && sudo apt-get dist-upgrade

Sometimes, it might be faster to create backups of your system and reinstall using supported release instead.

Share

Install CakePHP 3 On Ubuntu 16.04

This guide assumes you’ve set up a Ubuntu 14.04 server and have MYSQL up and running. This guide uses the “PHPMyAdmin” from the “One Click Apps” available on Digital Ocean running on a vps running Ubuntu 16.04. The smallest memory (512mb) should be enough to get you up and running.

If you don’t have a Digital Ocean account (you should, they’re a great service) get one here.

Step 1: Update Package Manager

ssh root@YOUR-IP

Note: If this is the first time you’ve logged into your vps, you will be asked to change the password from the one emailed to you when you created your vps. This is fairly self explanatory, simply follow the prompts.

Update your package manager:

sudo apt-get update

Step 2: Install Some PHP Modules

We need to install a few PHP modules that CakePHP uses. Namely the curl, zip, intl and sqlite modules. Continue reading “Install CakePHP 3 On Ubuntu 16.04” »

Share

Installing Smokeping on Ubuntu 14.04 LTS

Installing Smokeping on Ubuntu used to be a total breeze. Since 14.04 however, it’s been a bit of a mission.

This guide assumes a fresh out of the box Ubuntu install. I’m using the 64bit Server variety, but this should work on any 14.04 system.

UPDATE – It also works perfectly on Ubuntu 16.04 LTS Server :~)

Step 1: install smokeping (and you’re done).

sudo apt-get install smokeping -y

Step 2:  normally, you’d be done by now.. But things have changed.

sudo nano /etc/smokeping/config.d/pathnames

You’re going to want to go into the pathnames file and comment out the line about mail. Setting up mail to work with smokeping is outside the scope of this post. Because I’m lazy.

Do this:

#sendmail = /usr/sbin/sendmail

Then hit CTRL-O, Enter, CTRL-X. That’s how you save a file in Nano, I won’t stick that bit in again. Continue reading “Installing Smokeping on Ubuntu 14.04 LTS” »

Share