How to change a default gateway on Debian Stretch

First type in

ip route 

this will display a line with ‘default‘ this is your current default gateway

to change it type in as route

ip route change default  via 192.168.1.1 ethX

where ethX is the network interface you want to traffic to go through.

Advertisements

How to fix XenServer Updating issue

Login to your XenServer using SSH then run

xe patch-list

and take uuid

uuid ( RO) : 32e5c75c-29ce-4826-a971-bd92f5615caa
name-label ( RO): XS70E017
name-description ( RO): Public Availability: fixes to Toolstack
size ( RO): 24075528
hosts (SRO): bfcc59b8-322f-4e91-8493-9dee7dec04dc
after-apply-guidance (SRO): restartXAPI

then navigate to

cd /opt/xensource/patch-backup/

ls

and remove the folder based on UUID above which can’t update.

Once this is done you will be able to install problematic update.

How to change server name using ILO with no OS

This cannot be easily changed using GUI apparently ILO is taking this form OS host name but how to changed if there is no OS installed on the server?

ssh to ILO first

Then

cd system1

set oemhp_server_name= YourNewServerName

once done you can check if it has been changed

show oemhp_server_name

and your set sername should be displayed

How to make MSSQL Offline

Open up MSSQL Management Studio

Then Select Database -> your Database -> right click -> Task -> Take Offline.

If the database does not make offline then you can do the following

ALTER DATABASE <dbname> SET OFFLINE WITH ROLLBACK IMMEDIATE

If this is not working then use the following to find spid

USE master SELECT * FROM sys.sysprocesses WHERE dbid = DB_ID('MyDB')

or

EXEC sp_who2

then use

kill spidNumber

To force disconnections, use

ROLLBACK IMMEDIATE USE master ALTER DATABASE MyDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE

Preparing virtual test machine for Ansible

For this example I have used CentOS

Once you have downloaded and created your VM, you need first to configure your network interface.

In CentOs this can be completed by the network script. They are located in the following location:

/etc/sysconfig/network-script/

In my example I have to amend ifcfg-ens33 configuration file.

If you use DHCP then the only change you need to make is to set it up to be activated during the boot.

Then install Ansible as per my other post: https://wordpress.com/post/amionrails.wordpress.com/1790

How to install Ansbile on CentOS/Redhat

This is pretty simple.

  1. Install EPEP first

    sudo apt-get install epel-release

First add EPEL

Extra Packages for Enterprise Linux (or EPEL) is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL), Oracle Linux (OL).

EPEL packages are usually based on their Fedora counterparts and will never conflict with or replace packages in the base Enterprise Linux distributions. EPEL uses much of the same infrastructure as Fedora, including buildsystem, bugzilla instance, updates manager, mirror manager and more.

  1. Install Ansible

Ansible is the simplest way to automate apps and IT infrastructure. Application Deployment + Configuration Management + Continuous Delivery

sudo apt-get install ansible

All done!

List of Security Testing Tools

List of some interesting testing tools:

BackTrack –  Open Source Penetration Test Tool
Burp Suite –  Professional Software for web security testing
IBM Rational AppScan –  Commercial Web Application Security Scanner
Metasploit – Open Source Penetration Test Tool
Nessus – Freeware Network Security Vulnerability Scanner
Nikto – Open Source Web Site Security Scanner
Paros – Freeware Interception Proxy
soapUI – Web Services Testing Tool
sqlmap – Open Source SQL Injection Tool
WebScarab – Freeware Interception Proxy
WSDigger – Freeware Web Services Scanner
WSFuzzer – Freeware Web Service Scanner
ZAP  – OWASP Zed Attack Proxy

OWASP Testing Guide v4
https://www.owasp.org/index.php/OWASP_Testing_Guide_v4_Table_of_Contents

OWASP Top Ten Project
https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project

Web application Security Consortium (WASC) – 2008 Web Application Security Statistics
http://projects.webappsec.org/w/page/13246989/Web-Application-Security-Statistics

OWASP Developers’ Guide
https://www.owasp.org/index.php/Category:OWASP_Guide_Project