Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

I'm trying to follow this guide: http://bodhizazen.net/Tutorials/VPN-Over-SSH/

I'm having problems getting my VPN over SSH to work. I am pretty sure that I've done all the right steps, but I keep getting errors when I try to log on to my server.....

Here is what I get for errors.

root@theo62:~# sudo ifup tun0

SIOCSIFADDR: No such device

tun0: ERROR while getting interface flags: No such device

SIOCSIFNETMASK: No such device

SIOCSIFDSTADDR: No such device

tun0: ERROR while getting interface flags: No such device

Failed to bring up tun0.

Any suggestions would be greatly appreciated.

Thanks

share|improve this question

You've not done or made a mistake in the steps of tutorial which describe making changes to the file /etc/network/interfaces. The network interface tun0 needs to be present there in order to be recognized by the ifup and ifdown commands.

share|improve this answer
    
Below is a snapshot of my /etc/network/interfaces iface tun0 inet static pre-up ssh -i /root/.ssh/VPN -S /var/run/ssh-vpn-tunnel-control -M -f -w 0:0 10.1.1.251 true pre-up sleep 5 address 10.0.0.2 pointopoint 10.0.0.1 netmask 255.255.255.0 up route add -host 10.1.1.251 dev eth0 up route add default gw 10.0.0.1 dev tun0 up route del default gw 10.1.1.50 dev eth0 down route add default gw 10.1.1.50 dev eth0 down route del default gw 10.0.0.1 dev tun0 down route del -host 10.1.1.251 dev eth0 post-down ssh -i /root/.ssh/VPN -S /var/run/ssh-vpn-tunnel-control -O exit 10.1.1.251 – Irfaan Coonjah May 3 '13 at 15:28
    
And eth0 really is your "normal" network interface? – Stefan Seidel May 4 '13 at 21:13
    
eth0 is my normal network interface. Can the problem can be from the public-key generated? – Irfaan Coonjah May 6 '13 at 12:30
    
Well, obviously you should verify if the ssh command in question is actually working and you get logged in. Especially since it's being run as root user, not as you. – Stefan Seidel May 8 '13 at 14:22
    
The ssh command is working, I ssh the server and i managed to logged into. – Irfaan Coonjah May 10 '13 at 15:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .