Skip to content

Instantly share code, notes, and snippets.

@heatzync
heatzync / HOWTO.md
Created May 17, 2012 10:32
HOWTO connect to a company's VPN using the Cisco VPN client on linux

HOWTO connect to a company's VPN using the Cisco VPN client on linux

Introduction

This HOWTO explains connecting to a VPN gateway over IPSec in "cert auth mode" utilizing the Cisco VPN client. The "cert auth mode" refers to the terms used in the vpnc man page, i.e. server + client certificates. The "cert auth mode" has not been implemented for vpnc, otherwise we would just use vpnc and avoid the headache that follows. openconnect is another alternative, but it does not support IPSec, only HTTPS/SSL. This HOWTO is written with the aim to provide a single document to describe all the steps required, instead of having to search many different things on the Internet.

This HOWTO was written from the perspective of an openSUSE 12.1 user, running a 3.1.10-1.9-desktop x86_64 kernel. The author does not claim to be an expert on any terms used, so if you find a mistake then please submit a patch.

Get the certificate provided by Company

@heatzync
heatzync / WindowsFileHandling.java
Created May 4, 2012 13:54
The "file" cannot be moved (deleted) on Windows, but it can be moved on linux. Why?
Logger logger = LoggerFactory.getLogger();
FTPClient ftpClient = new FTPClient(); // from commons-net
public void upload(File file) {
InputStream is = null;
try {
is = new BufferedInputStream(new FileInputStream(file));
this.logger.debug("Uploading file");