Set or change a passphrase for an OpenVPN server key.

This command will set a passphrase for the server pem file for OpenVPN on Linux. I setup a VPN configuration on Ubuntu and forgot to set the passphrase. This is how I managed to set one. ubuntu@ip-172-31-13-140:~$ sudo openssl rsa -des3 -in server-key.pem -out server2.pem Enter pass phrase for server-key.pem: writing RSA key Enter PEM … Read more

How to set a MAC address on a Cisco 3700 router.

This command in interface configuration mode will change the MAC address for a specific interface on the router. R1(config-if)#mac-address DE.AD.BER1(config-if)#mac-address DE.AD.BE And this is what I get when I use the show run command and view the properties of the interface. interface FastEthernet0/0 mac-address 00de.00ad.00be ip address 192.168.0.1 255.255.255.0 ip nat inside ip nat enable … Read more

How to get comprehensive SSL information out of a website with Ubuntu.

The sslscan utility will print out a comprehensive report listing all of the SSL ciphers used by a website secured by SSL. This can be very useful information when you are planning to attack this website. Or just for research purposes. In this example, I am scanning facebook.com and getting information about the ssl ciphers … Read more

How to create keys with easy-rsa without a password prompt.

To create a new set of keys for OpenVPN using Easy-RSA, we firstly need to clean our environment and get ready for the build. $ ./easyrsa init-pki$ ./easyrsa init-pki Now we need to build the certificate authority. $ ./easyrsa build-ca nopass   Note: using Easy-RSA configuration from: ./vars Generating a 2048 bit RSA private key … Read more

Add a fancy progress bar to the apt command on Linux.

To add a fancy progress bar to the apt command on Linux, edit this file: /etc/apt/apt.conf.d/99progressbar and add the line below. Dpkg::Progress-Fancy "1";Dpkg::Progress-Fancy "1"; Save the file and when you next install software with the apt command, you will get a fancy progress bar at the bottom of the screen. This is a very nice … Read more

Get information about your computer hardware with Linux.

Get information about installed hardware with these commands This command will print the make and model of your motherboard. jason@eyjafjallajkull:~$ sudo dmidecode -t baseboard [sudo] password for jason: # dmidecode 2.12 SMBIOS 2.4 present.   Handle 0x0002, DMI type 2, 8 bytes Base Board Information Manufacturer: Gigabyte Technology Co., Ltd. Product Name: H55-USB3 Version: x.x … Read more

Change your MAC address on Linux with the command line.

To change your MAC address in Linux, you just need to issue these few commands, and then re-run dhcp or reconfigure the interface. This works for both wired and wireless cards. Bring down the interface. jason@eyjafjallajkull:~$ sudo ifconfig eth0 down [sudo] password for jason:jason@eyjafjallajkull:~$ sudo ifconfig eth0 down [sudo] password for jason: Set a new … Read more

Adding an IP address to the management interface for a Cisco switch.

Adding an IP address to the management interface of a Cisco switch allows connection over an Ethernet connection to manage the switch configuration. Firstly, switch to privileged exec mode. tyrion>en tyrion#tyrion>en tyrion# Then enter the configure terminal command to configure terminal settings. tyrion#configure terminaltyrion#configure terminal Now we are configuring settings for vlan 99. tyrion(config)#interface vlan … Read more

List all of your IP addresses using the ip command.

The ip command will list all of your ip addresses when combined with the grep command to look for all inet words. This is a very useful one-liner. ubuntu ~/Documents $ ip a | grep "inet " inet 127.0.0.1/8 scope host lo inet 172.31.20.16/20 brd 172.31.31.255 scope global eth0 inet 10.8.0.1 peer 10.8.0.2/32 scope global … Read more