27 apr

How to lookup a domain or IP in Linux

How do I install whois client to see whois information about domain and ip address using command line options under Fedora / RHEL / Redhat / CentOS?

jwhois is a whois client that accepts both traditional and finger-style queries under RHEL. You can install the same using the yum command. Login as root and type the following command to install the jwhois client:

# yum install jwhois

Sample Output

# yum install jwhois
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package jwhois.x86_64 0:4.0-19.el6 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
======================================================================================================================================================================================================
 Package                                        Arch                                           Version                                             Repository                                    Size
======================================================================================================================================================================================================
Installing:
 jwhois                                         x86_64                                         4.0-19.el6                                          base                                         104 k
 
Transaction Summary
======================================================================================================================================================================================================
Install       1 Package(s)
 
Total download size: 104 k
Installed size: 294 k
Is this ok [y/N]: y
Downloading Packages:
Trying other mirror.
jwhois-4.0-19.el6.x86_64.rpm                                                                                                                                                   | 104 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : jwhois-4.0-19.el6.x86_64                                                                                                                                                           1/1
  Verifying  : jwhois-4.0-19.el6.x86_64                                                                                                                                                           1/1
 
Installed:
  jwhois.x86_64 0:4.0-19.el6
 
Complete!

Source: Cyberciti.

18 nov

VMware vCloud Director static routing between edges.

In my case I had a situation where a customer (one vCloud director Organization) needed to route traffic between vlans configured behind two seperated vShield Edge Gateways.

Example of the design

vcloud_director_situation

To accomplish the goal you need to Enable Static routing on both Edge Gateways.
Go to Administration – Select the vDC – Edge Gateways – Right click the gateway – Edge Gateway Services Static Routing – Toggle the checkbox and save.

static_routing

Then you need to configure static routing per Edge. Add a route from Edgex to vlan y and vica versa. Click add on the Static Routing tab and fill in:

add_route

Applied on: The “external network” from the design, not the vlan where you configure it on.
Name: Give it a description (ex. from Edge x to vlan y)
Network: The network you want to reach
Next Hop IP: Fill in the other Edge Gateway’s IP address

Click ok and ok to apply the changes.

Happy routing!

18 nov

What is the difference between typing Ctrl+C and Ctrl+D in the Linux terminal?

Control+C is used to kill a process with the signal SIGINT, and can be intercepted by a program so it can clean its self up before exiting, or not exit at all.
Control+D is EOF (End-Of-File). It closes the stdin pipe. If read(STDIN) returns 0, it means stdin closed, which means CTRL+D was hit (assuming there is a keyboard at the other end of the pipe).

Ctrl + C To terminate.
Ctrl + D signals EOF.
Ctrl + Z suspends a program.

04 nov

Clean up comet directory in cPanel

When managing some cpanel servers I sometimes get a problem of inodes that fill up the disk space.

#dh -h

The above command will sometimes show that there is enough disc space however, when I run the following command

#df -ih

You’ll see that the inodes that are free are 0%

There are a few possibilities to clean up some disc space. In the last case, the disk space was filled up due to a spam attack and a lot of spam mails (mailqueue) were temporary moved to the cpanel comet directory.

# /root/.cpanel/comet

You can remove them via the control panel, but when you’re not able to log-in or you just prefer the command line you can use following command.

/usr/local/cpanel/bin/purge_dead_comet_files

This will free up some ‘disc space / inodes’.

24 jun

.shop komt eraan

shop

De langverwachte .shop-extensie zal eindelijk gerealesed worden. De mogelijkheden onder deze extensie zijn eindeloos, denk maar aan pasta.shop, wine.shop, sushi.shop, toy.shop, designer.shop, coffee.shop, tattoo.shop, kids.shop,… De extensie is universeel en eenvoudig te onthouden.

De release van de .shop-extensie zal in 3 fasen verlopen:

Van 30/6/2016 tot 26/8/2016: sunrise
Van 01/09/2016 tot 26/9/2016: early access
Vanaf 26/9/2016: general availability

Contacteer ons voor meer informatie.

28 apr

Authentication refused: bad ownership or modes for directory

When you cannot remote login to a server with public/private key authentication and you’ll get following error:

Apr 28 12:02:54 server sshd[30793]: Authentication refused: bad ownership or modes for directory /user

Execute following on the user (you use t login) his home directory

chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys