Linux Tips and Tricks

A collection of tips, tricks and everything linux

Archive for the ‘ssh’ Category

Using Cisco vpn client with Ubuntu Linux Desktop

with 6 comments

Configuration

Download and install the Cisco vpn Client. im using vpnclient-linux-x86_64-4.8.02.0030-k9 at the time of this article.
(if u need it send me an email). unpack, and install in my installation i opted out of the option for starting as a daemon so i start it manually everytime.

mnk0@tree:~$ sudo /etc/init.d/vpnclient_init start

Using my PROFILE.pcf file

Then we can copy our Cisco VPN Profile over to the profile directory.

mnk0@tree:~$ cp PROFILE.pcf /etc/opt/cisco-vpnclient/Profiles/

Now we are ready to connect to our connection. Note we dont add the .pcf extension to the profile we’re going to use

mnk0@tree:~$ /etc/opt/cisco-vpnclient connect PROFILE
Initializing the VPN connection.
Contacting the gateway at 4.23.45.21
Contacting the gateway at 4.23.45.21 (balancing)
User Authentication for PROFILE...
The server has requested the following information to complete the user authentication:
Username [mnk0]:
Passcode []:
Authenticating user.
Negotiating security policies.
Securing communication channel.
Your VPN connection is secure.
VPN tunnel information.
Client address: 10.10.10.46
Server address: 4.23.45.21
Encryption: 256-bit AES
Authentication: HMAC-SHA
IP Compression: None
NAT passthrough is active on port UDP 4500
Local LAN Access is disabled

Exiting

When we are ready to exit, just hit CTRL+C on your terminal session, and shutdown the daemon.

mnk0@tree:~$ sudo /etc/init.d/vpnclient_init stop
mnk0@tree:~$ Done

Written by mnk0

February 13th, 2009 at 8:02 pm

Posted in Linux, Ubuntu, networking, ssh

Tagged with , , ,

Bypass firewalls using ssh and tunnelling.

with 2 comments

Ever wanted to access a service behind a firewall that has port 22 open for ssh connections? This is a common setup known as using a jump-box for security access and to be successful at this we your firewall must allow port 22 traffic to your ssh jump-box. We can test our if port 22 is open by typing the following line.

telnet ssh-jump-box 22

If all is good then we should see something like
Trying 192.168.1.200...
Connected to ssh-jump-box.
Escape character is '^]'.
SSH-2.0-OpenSSH_4.7p1 Debian-8ubuntu1.2

In this example we’re going to create a tunnel for port 3389 windows rdekstop and we’ll begin by creating a local loopback port 3390 that ssh will tunnel from myMachine to myFireWalledMachine on port 3389

ssh -L 3390:server-behindFirewall:3389 user@ssh-jumpbox -N

Now we can access the service on port 3389 that was previously inaccessible through the firewall by pointing our connection to the local loopback port we just created through ssh. In this case we\’ll use rdesktop to hit that port as we are trying to remote desktop to a firewalled machine.

rdesktop localhost:3390

Written by mnk0

September 23rd, 2008 at 3:23 pm

Posted in ssh

Tagged with , , ,