Posts Tagged ‘Linux’

How to Generate an SSL CSR (Certificate Signing Request)

csr In order to request a signed SSL/TLS certificate you have to send the Certification Authority a  proper formed request often indicated just as “CSR” together with the other details.
If you are  using Apache you can generate your passphrase-protected RSA 1024 bit key using  openssl with:

openssl genrsa -des3 -out your.host.tld.key 1024

And then generate the CSR to send ‘em, again using openssl with:

openssl req -new -key your.host.tld.key -out your.host.tld.csr

You will be prompted for some information that must be included in the CSR itself, and in short it will be done.


Connection forwarding over ssh secure channel

So Alice returned from wonderland to her dark and unsecure world, without sendig Bob the awaited postcard, that may be a big deal for their friendship, unless Alice keep with her an ssh access to the wonderland:

ssh alice@wonderland -L [<alice-bind-addr>:]<alice-port>:<bob>:<bob-port>

forward-in-tunnel That will please Alice for a while since if her postcard is sent out from the <alice-port> it’s gonna be forwarded to wonderland over a (supposed) secure channel and then sent to Bob, but blues is aroud the corner because she’s now used to be carefree using her unsecure application protocol from wonderland and she doesn’t want to set up forwarding for each of her friends. Anyway, she may be fine using ssh as a SOCKS server reached over the secure channel with:

ssh alice@wonderland -D [<alice-bind-address>:]<alice-port>

Tree

Tree Some times you want to recursively check the contents of a given directory right in your shell  asking for its inherent tree.

But sometimes the ‘tree’ utility is not available, and you may have no rights to install it or you  just  don’t want to. Other times you may even have to deal with ports to  get  the simple tree  utility.

In these cases, find and sed are here to help:

#!/bin/bash
find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'

Netkit BGP-RIP Labs Generator

Netkit A bash script I wrote to quick build the requested Netkit labs for the final of the Computer  Networks  Infrastuctures class last july. I’m really pleased with those exams where you can  separate concepts  from specific and likely-to-change knowledge that may become useless or  forgotten soon.  Especially if smart professors allow you to automate or give less emphasis to the  second part, which  should be anyway known, but focusing on the first.

This bash script implements an input driven lab generator for Netkit, the “poor man’s system to experiment computer networking” developed and mantained at Roma Tre University.
The script prompt the user with questions and expects answers in indicated formats (pretty easy to get from examples). At the end, if feed with correct input, it should build up a working lab with network configuration based on BGP and RIP as IGP. It doesn’t configure prefix-lists or route-maps but examples are provided under comments.
This may be really useful for students at the Computer Networks Infrastructures class since most of the labs requested in finals may be generated with this script in minutes (while you are given about an hour, so you got lots of time to set up more complex stuffs and to check them).

[ Download ]

Read more


Install fest 2008

Here is the presentation used at the install fest today :)
Hope people had fun ;)


Kernel Recompiling


Return top

About me