Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to create a separate device (like tun made by openvpn) for ipsec? If yes how can I do it?

share|improve this question
up vote 0 down vote accepted

Yes, you can.
Exactly how to do this will depend on your situation.

Here's a bare-bones way to do it:

Load the kernel module.

/sbin/modprobe tun

Create the tunnel device

cd /dev
sudo MAKEDEV tun

This will create /dev/net/tun .

Use openvpn to create tun0 .

sudo openvpn --mktun --dev tun0

Optionally, edit /etc/network/interfaces, and bring up tun0 .

sudo ifup tun0
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.