Install whois CentOS / Ubuntu

jwhois is a whois client that accepts both traditional and finger-style queries. You can install the same using yum in Centos and apt-get in Ubuntu systems

Centos  :

yum -y install jwhois

Ubuntu

sudo apt-get install jwhois

 

In Centos/ Redhat systems you can run the command whois

# whois ajayadas.com
[Querying whois.verisign-grs.com]
[Redirected to whois.godaddy.com]
[Querying whois.godaddy.com]
[whois.godaddy.com]
Domain Name: AJAYADAS.COM
Registry Domain ID: 1545424198_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.godaddy.com
Registrar URL: http://www.godaddy.com
Update Date: 2013-05-12T10:55:01Z
Creation Date: 2009-03-04T22:04:18Z
Registrar Registration Expiration Date: 2017-03-04T22:04:18Z
Registrar: GoDaddy.com, LLC
Registrar IANA ID: 146

 

But in Ubuntu based systems you have to run jwhois

$ jwhois ajayadas.com

 

 

 

knockd – a port-knocking server – setup

knockd – a port-knocking server . It’s amazing and I feel it’s an essential tool to secure the ports.

Here i setup knockd server for Open-SSH in ubuntu

#1: Install Knockd

$ sudo apt-get install knockd

up on installation, you will get a message says knockd is disabled

#2 : First need to configure the files before we start the service , edit  knockd.conf file

$ sudo vim /etc/knockd.conf

this is how my file looks like

[options]

UseSyslog

[openSSH]
sequence = 7000,8000,9000
seq_timeout = 5
command = iptables -D INPUT -p tcp –dport 22 -j DROP
tcpflags = syn

[closeSSH]
sequence = 9000,8000,7000
seq_timeout = 5
command = iptables -A INPUT -p tcp –dport 22 -j DROP
tcpflags = syn

 

#3: Edit /etc/default/knockd file to enable the service

$ sudo vim /etc/default/knockd

my file looks like this

################################################
#
# knockd’s default file, for generic sys config
#
################################################

# control if we start knockd at init or not
# 1 = start
# anything else = don’t start
#
# PLEASE EDIT /etc/knockd.conf BEFORE ENABLING
START_KNOCKD=1

# command line options
KNOCKD_OPTS=”-i eth1″

#4 Start the service

 

sudo service knockd start #<– start server
sudo service knockd stop #<– stop server
sudo service knockd restart #<– restart server
sudo service knockd status #<– see status server

#5: how to use knock

From client machine try this (you might need to install knockd)

knock  -v   192.168.1.2 7000, 8000, 9000

you will see

hitting tcp 192.168.1.1:7000

hitting tcp 192.168.1.1:8000

hitting tcp 192.168.1.1:9000

 

Whala! now you can ssh into the machine

ssh ajay@192.168.1.1

 

FIXED – SoftException in Application.cpp:631: Directory “/home/ajay/public_html” is writeable by group

Cpanel Error: [Sun Feb 01 20:41:30.060061 2015] [:error] [pid 401503:tid 140542316816128] [client xx.xx.xx.xx:44688] SoftException in Application.cpp:631: Directory “/home/ajay/public_html” is writeable by group

In this case the folder had permissions for a folder set too high. To correct this, the permissions need to be changed from “777” to “755”.

Directories and folders should be 755. Executable scripts within the cgi-bin folder must be 755. Images, media, and text files like HTML should be 644.

Files – 644
CGI Scripts – 755
Directories – 755

You can modify permissions with the File Manager, located in the “Files” category of the cPanel, an FTP client, or using the chmod command in SSH/Bash.
Bad .htaccess, Invalid code, command, or syntax

In the .htaccess file (“dot htaccess”), you may have added lines that are either worded badly or conflicting. The best way to troubleshoot this is comment out the lines in the .htaccess.

You can comment out a line in the .htaccess by adding # to the beginning. You are wise to save an original copy of any file before you make changes.

For example, if the .htaccess looks like this:
DirectoryIndex default.html
AddType application/x-httpd-php5 php

Then try something like this:
DirectoryIndex default.html
#AddType application/x-httpd-php5 php

 

Enable SSH (Secure Shell) in Elementary Luna / Ubuntu

installl ssh

To get started, press Ctrl – Alt – T on your keyboard to open Terminal. or open your  gnome-Terminal  (If installed)

When it opens, run the commands below to install SSH Server.

 

sudo apt-get install openssh-server

That's it! , if you need to change default port and stuff , edit the below file

sudo vi /etc/ssh/sshd_config

or

sudo gedit /etc/ssh/sshd_config

For a simple and quick SSH client, click here to download Putty.

Change HostName Permanently – Ubuntu

We can manually edit these files using a text editor like vim:

sudo vim /etc/hosts
sudo vim /etc/hostname

In /etc/hostname simply overwrite the existing hostname with a new one. In /etc/hosts

you will find the hostname on the line beginning 127.0.0.1 – overwrite only the hostname with the new one, and then reboot.

Editing /etc/hosts using nano

 

WP Twitter Auto Publish Powered By : XYZScripts.com