NETWORKSTIP Networking CCNA,Centos,Ubuntu,Sql,

Made By Muhammad Nafees

Breaking

Thursday 22 September 2016

September 22, 2016

Port Forwarding - Step-by-Step Pfsense

CREATE NAT:RULE IN ONE STEP
  • Go to Firewall…NAT.
  • Click the Plus iconon the bottom-right.  
  • Destination type, as far as I can tell, will usually be any.
  • Enter your port(s) alias name in Destination Port Range.
  • Enter your Host alias name in Redirect Target IP.
  • See my example below, and make sure that Add associated filter rule is selected at the bottom before pressing Save and then Apply on the next screen.


Monday 19 September 2016

September 19, 2016

How to forward window logs to loganalyzer

Event Log Forwarder for Windows

Log Forwarder for Windows

The purpose of this free program from SolarWinds is to send events, which have been captured by a Windows server, to a Syslog server for processing.
The problem this nifty utility solves is that Windows servers don't natively support syslog protocols.  Thus the dashboard supplied gives you a method for consolidating event log messages, and works well with SolarWinds Kiwi and Orion products.


Installing SolarWinds Event Log Forwarder for Windows

I test numerous software packages, and I often criticise programs for their complex install routines, but in the case of the Log Forwarder for Windows, Guy says:- "This setup couldn't be easier."
Simply download and then install the program from its .msi file.  As a result you will get an interface (LogForwarderClient.exe) where you configure log Subscriptions and connect to your Syslog server.  Meanwhile, the underlying SolarWinds program (LogForwarder.exe) has installed as a Windows Service called: Log Forwarder for Windows.

Creating Subscriptions at Your Log Forwarder Dashboard


As you may expect, Event Log Forwarder for Windows supports the latest Windows eventing 6 ("Crimson") format, in addition, there is backward compatibility with the old Windows Eventing 5 from the Window Server 2003 and XP era.
XML experts may be interested in studying LogForwarderSettings.cfg file; they may wish to amend tags in the < EventLogSubscriptions> and <SyslogServers> sections.

Adding Individual Log Subscriptions

At the heart of the Event Log Forwarder is the interface which links to the actual Windows Logs.  Click on 'Event Sources' [key point] and select which subscriptions you wish to collect in the logs that will be sent to the Syslog server. 

After a few trials, you will appreciate the flexibility of this utility; at which point you may like to go back and adjust your subscriptions.  Alternatively, after a bout of testing I often delete and start again.


Connecting a Syslog Server to Your Dashboard

Please remember that in order to get any action with the SolarWinds Event Log Forward for Windows, you need a Syslog server.  It's vital to have a server which can receive logs such as security, application or system, which are forwarded by your Windows machine(s).
The source of these event logs can be Windows Server 2003 R2 or later; alternatively, you could trial the forwarder from a client such as Windows 7 or 8.
Note that SolarWinds' latest version supports sending event messages using TCP, (rather than UDP).

Test Screen

The 'Test' tab actually allows you to create an entry in one of the Event Logs on your Windows computer.  The screen enables you to test that forwarding to the Syslog server specified is indeed taking place.  Naturally, you can only perform a test on event that you have already added in your 'Subscriptions'.  Here is a screenshot of the Test Screen tab.

The result you are looking for is: "test event created successfully". However, if there's any error, then you get a message saying: "creation of test event was unsuccessful".

IF The above mention method is now working then Try this one 

1st download the Syslogagent by clicking blew mention link 

https://drivcom/file/de.google./0B8aK61IFJl13SWhIanZZNmJhYU0/view?usp=sharing

If you extract the 2MB Syslog file that you downloaded, there are a few files but the only three important files are the PDF user’s manual, the SyslogAgent configuration tool, and the SyslogAgent that you need to install on the server.


Figure 1: SyslogAgent Installation Files
In the sense of a traditional Windows application install, there is not one for the SyslogAgent service. You just run the SyslogAgentConfig tool and click Install under the Service Status section at the top.


Figure 2: Installing the SyslogAgent Service
This will create the Windows service for the SyslogAgent.
Before you get too excited and start the service, let’s first configure it.
The minimum configuration would be:
  • That the service is install
  • A syslog server IP and port are configured
  • That either event or application logs are selected to be sent to the syslog host (for whatever type of events and/or applications you choose)
  • And that the syslog agent service is started.
To select where the log data from your Windows host will be sent, enter the IP address of the syslog host, as you see in the graphic, Figure 2, above. In my case, the Log Insight syslog server’s IP address was 10.0.1.120 and we were using UDP port 514.
With this enabled, I checked the Event Logs option and selected what type of event logs I wanted. For system monitoring, I would recommend sending “system logs” but you are welcome to send any type of logs you want such as security logs for
auditing purposes.


Figure 3: Selecting the Event Logs to Send to the Syslog Host
Optionally, you can configure the application log events to forward and even customize their facility and severity, as you see in Figure 4.

Figure 4: Customizing Facility and Severity
Optionally, you can choose to send events from specific Windows applications to the syslog host, even specifying the executable for the custom application (as you see at the bottom of Figure 2).
Once you’ve got it configured, click Start Service.
You are welcome to double check your Windows services to see that the SyslogAgent is added and running as you see below in Figure 5.



Figure 5: SyslogAgent Running in Services
With the syslog agent running, let’s go check our syslog server to see if it is receiving messages from our Windows 2012 Server.

Testing Syslog with VMware vCenter Log Insight

Let’s assume that your syslog server was installed and is running fine, at the IP address you specified on the agent. In my case, I am using the new VMware vCenter Log Insight as my syslog host but there are numerous options.
Over on the vCenter Log Insight console, indeed, I was quickly able to identify syslog traffic coming from my Windows 2012 Server (with a DNS name of HV1).

Wednesday 14 September 2016

September 14, 2016

install Own Cloud storage server with latest ownCloud 9 Centos 7

Own Cloud Description

Own Cloud is opensource private cloud storage software package that works as straightforward way to serve and store content from  its centralized location, Dropbox, iCloud  is very similar application which provide this functionality but these are not trustable and users want to secure the data or fetch the data from  off the cloud. Now Run your own private cloud storage server and manage the data with sharing with anybody , syncing with mobile and desktop device , documents and notifications etc….

Reason behind to Use ownCloud

  • ownCloud is open source based free tool that have not any limitations and make changes as you wish.
  • Data can be share with anybody , who is in your know very well.
  • Flexible secondary storage to provide data to store.
  • You can read PDF’s , see videos with  live or real time  text editor  .
  • Set limits through quota management on external storage.
  • Support of  Accessing of Directory through integration with LDAP / Active
  • ownCloud maintains files previous versions, so that we can recover from any accidental delete.
  • Task can be synchronized with calendar . 
To Read more about the features of ownCloud https://owncloud.org/features

Steps to Install ownCloud 9 on CentOs / RHEL 7 Server :

Server Requirements

  • Minimum RAM required by ownCloud Software : 128 MB
  • Recommended RAM required by ownCloud : 512 MB
You can use RAM according to your requirement or server resources usage or users activity.

Install Software Collections ( SCL ) Repository


We need to set up first Software Collections ( SCL ) Repository on our CentOS 7 and  SCL for RHEL which is compiliance with RHEL server contract.( Do not use any other third party repository )  Server through below command
# subscription-manager repos --enable rhel-server-rhscl-7-eus-rpms

For CentOs 7

# yum install centos-release-scl –y


Install and Configure Apache Web Server  :


Begin by installaing  the  httpd packages.

# yum install httpd –t

Start and Enable httpd service.

# systemctl start httpd.service 
# systemctl enable httpd.service 


Install  PHP 5.5 or Upgrade to  PHP 5.5


ownCloud works on PHP 5.4 but this is version of php has been end of life but Red Hat support php 5.4 on lates version 7 . better is use of 5.5 for better performance and security.
Here we are assuming in this set up you have taken fresh server , where there is no php or apache server is configured.
Now install PHP and its module . also php mysql module .

# yum install php55  php55-php-gd php55-php-mbstring php55-php-mysqlnd  php55-php

Then restart apache server.

# systemctl restart httpd.service


Install & Create MySQL/ MariaDB Server


Install MariaDB on server server with yum command. Mariadb group install mariadb-server, mariadb-bench, mariadb-test.

# yum groupinstall mariadb mariadb-client

# systemctl start mariadb ( Start the MariaDB Server )

# systemctl enable mariadb ( Enable for Boot Time )

Verify of the status of service.

# systemctl status mariadb

Configure the MariaDB Server to improve security. Run below command and read carefully and follow its instructions.

# mysql_secure_installation
 mysql -u root -p  Enter password:  MariaDB[(none)]>CREATE DATABASE privatecloudDB;  MariaDB[(none)]>GRANT ALL ON privatecloudDB.* to 'privateclouduser'@'localhost' IDENTIFIED BY '[ENTER_PASSWORD]';  MariaDB[(none)]> FLUSH PRIVILEGES;  MariaDB[(none)]> quit

Install ownCloud 9


  • Download the latest version of own cloud software from it official web site  https://owncloud.org
  • Currently software is available on zip and bzip2 compressed file and also download its checksum files to Verify the MD5 or SHA256

Here we are going to download through bzip2 compression file relatives checksums and check and download through below steps.

Download ownCloud 9.x bz2 file.


# wget https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2

Download MD5 or SHA256 sum


# wget https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2.md5 
# wget https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2.sha256
Verify :
root@dolibarr:/var/www/html# md5sum -c owncloud-9.0.0.tar.bz2.md5< owncloud-9.0.0.tar.bz2  owncloud-9.0.0.tar.bz2: OK 
root@:/var/www/html# sha256sum -c owncloud-9.0.0.tar.bz2.sha256 < owncloud-9.0.0.tar.bz2  owncloud-9.0.0.tar.bz2: OK
Unpack the downloaded bzip2 compress file through tar command.

# tar –xjf owncloud-9.0.0.tar.bz2
Configure unpacked code direcotory on website web server document root . Here I am renaming the directory from owncloud to myprivatecloud
# mv  owncloud myprivatecloud 
# cp –rvf  myprivatecloud  /var/www

Configure Apache Virtual Host 

Create the file /etc/httpd/conf.d/owncloud.conf with the following contents :
<VirtualHost *:80>    ServerName  info@techtransit.org    ServerName  owncloud.techtransit.org    DocumentRoot /var/www/html/myprivatecloud    </VirtualHost>    Alias /owncloud "/var/www/html/myprivatecloud"    <Directory /var/www/html/myprivatecloud >    Options +FollowSymlinks    AllowOverride All    <IfModule mod_dav.c>    Dav off    </IfModule>    SetEnv HOME /var/www/html/myprivatecloud    SetEnv HTTP_HOME /var/www/html/myprivatecloud    </Directory>
Now restart apache service.
# systemctl restart httpd.service

Run your own cloud storage

After restarting Apache you need to start installation through graphical method through given FDQN.
#  http://owncloud.techtransit.org

Now below showing images for installation steps in browser, in first images , here i am giving admin portal username password. which will create for admin login and directory location where data will be stored. you need to set proper permission on that location and in second image you need to set database username database password and database name , which we have created in configuration time.


Thank you ðŸ™‚ Hope you have enjoy the installation instruction.