sshfs and openvpn

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
phizone
Posts: 4
Joined: Thu 14 Dec 2006, 01:28
Contact:

sshfs and openvpn

#1 Post by phizone »

I'm working on a custom puppy derivative (via unleashed) and needed sshfs to mount remote home directories via ssh and openvpn to secure a voip client connection to a central server, so I compiled and packaged sshfs and re-packaged the necessary files from the debian sarge openvpn package. Hopefully these will be useful for others...
Attachments
sshfs_fuse-1.7.tar.gz
sshfs fuse 1.7 pupget
(57.53 KiB) Downloaded 2173 times

redrum
Posts: 56
Joined: Mon 02 Oct 2006, 11:16
Location: Athens , Grecce

#2 Post by redrum »

great work ! Very usefull :D

JohnMc
Posts: 118
Joined: Fri 07 Apr 2006, 15:18

good job!

#3 Post by JohnMc »

Most definately on the openvpn!

mlamelas
Posts: 42
Joined: Wed 04 Oct 2006, 12:53
Location: Madrid, Spain
Contact:

Problem getting openvpn to work

#4 Post by mlamelas »

Hello,

I have installed both of the pupgets in this topic thread, but when I try to execute open vpn, I get the following error message:

Mon Mar 5 12:45:45 2007 Note: Cannot open TUN/TAP dev /dev/net/tun: No
such device (errno=19)
Mon Mar 5 12:45:45 2007 Note: Attempting fallback to kernel 2.2 TUN/TAP
interface
Mon Mar 5 12:45:45 2007 Cannot allocate TUN/TAP dev dynamically
Mon Mar 5 12:45:45 2007 Exiting

I looked in the /dev/net folder and there is a tun file in it, but it a zero byte file. Is that correct? Or am I missing something else I have to install?

Thanks,

Mel

kirk22
Posts: 15
Joined: Thu 03 May 2007, 23:15

#5 Post by kirk22 »

I'm getting the same error with Puppy 2.15.

Is Universal TUN/TAP device support compiled in the kernel?

I've also run -
mkdir /dev/net
mknod /dev/net/tun c 10 200

Any help would be appreciated.

mlamelas
Posts: 42
Joined: Wed 04 Oct 2006, 12:53
Location: Madrid, Spain
Contact:

#6 Post by mlamelas »

I was able to get it work but honestly I cannot remember how now, and it was only a test. Are you trying to get OpenVPN to work? I think what I did was chmod 666 /dev/net/tun to set rw permissions for everyone but I cannot remember. I should have written it down.

For the original posters, because I actually want to get OpenVPN going again, is the SSH pup related to OpenVPN or separate, i.e., do I need to install both pups or just the OpenVPN to get OpenVPN to work? The original post had two pups in the answer.

Many thanks,

Mel

kirk22
Posts: 15
Joined: Thu 03 May 2007, 23:15

#7 Post by kirk22 »

Thanks for the reply.

Yes I'm trying to get OpenVPN going. At this point it's more like a desperate need.

chmod 666 /dev/net/tun did not work and neither did 777.

It looks like the tun.ko module is missing. Can a more experienced user confirm that fact and maybe compile it for 2.15CE?

Which version of Puppy did you use?

BTW, based on the original post, it looks like sshfs is to mount remote directories. I don't think it's directly needed for OpenVPN.

If you figure out anything, please let me know.

Kirk

kirk22
Posts: 15
Joined: Thu 03 May 2007, 23:15

#8 Post by kirk22 »

I got it going. The driver was stripped out.

I compiled the kernel and drivers, and copied the tun.ko file to /lib/modules/2.6.18.1/kernel/drivers/net on the CD

Then I used this script to start:
http://www.tuxjm.net/downloads/source/s ... envpn.init

Seems to work well so far.

Kirk
Attachments
tun.tar
Tun Modules
(40 KiB) Downloaded 1118 times

DennisF
Posts: 86
Joined: Thu 01 Mar 2007, 02:38

#9 Post by DennisF »

I have always used
# modprobe tun

to make the virtual tunnel device, only need to run that once then

You need the config file from the far side firewall connection and fire it up like so...
# openvpn your_config_name.ovpn

No need to recompile the kernel. As for the 2 pups I have always installed both.

And yes it works really good. Neat script too.

-D

kirk22
Posts: 15
Joined: Thu 03 May 2007, 23:15

#10 Post by kirk22 »

modprobe tun did not work until after I compiled the module and put it in the right spot.

Maybe it's the version I have... maybe this box doesn't like me...I don't know...but it does seem to be working now.

EDIT: I stand corrected. modprobe tun does work in 2.14 and 2.15CE. It doesn't work on my remastered 2.15CE disk...go figure.

User avatar
lvds
Posts: 340
Joined: Tue 23 Jan 2007, 15:15
Location: Near the window

#11 Post by lvds »

Hi,

I am asking for help on running openvpn as i did like said above but have no results, so if someone could point me to the thing i have missed it would be very useful:

1. I have installed ssh_fuse and openvpn tar.gz downloaded above
2. i have downloaded tun.tar and put the KO files at the right place like stated above
3. downloaded openvpn.init and chmod +x so to be able to run it.

Reading openvpn.init shows it needs a config file to be in /etc/openvpn/myconfig.conf

but i have no idea how to build this config file... I need the vpn to be on port 443...

I have created /etc/openvpn but let it empty
Now, i open a terminal and when i run

Code: Select all

# ./openvpn.init start
it says "starting openvpn: success" but when i check with

Code: Select all

# netstat -ta

there is no service listening to any port.

So, please, may someone help me to have this vpn running ?

Best regards,
Laurent.

DennisF
Posts: 86
Joined: Thu 01 Mar 2007, 02:38

#12 Post by DennisF »

It would help to know what you want to connect to.
My experience is connecting as a mobile user to a firewall the config files are generated on the firewall and loaded on the client.


-DF

User avatar
lvds
Posts: 340
Joined: Tue 23 Jan 2007, 15:15
Location: Near the window

#13 Post by lvds »

DennisF wrote:It would help to know what you want to connect to.
My experience is connecting as a mobile user to a firewall the config files are generated on the firewall and loaded on the client.
-DF
Hi,

Well i want to connect to another puppy pc with openvpn, it seemed obvious to me but now i read your response i understand it is not the only option... :oops:

Best regards,
Laurent.

mroogly
Posts: 1
Joined: Wed 10 Oct 2007, 14:24

Compiling tun.ko

#14 Post by mroogly »

I was wondering if someone had already written a guide to recompiling the tun.ko or similar kernel modules.

I have a different version of puppy (2.6.21.5), and I need the same file.

Thanks ahead.

John

jamescridland
Posts: 4
Joined: Sat 03 Nov 2007, 18:28

Re: sshfs and openvpn

#15 Post by jamescridland »

phizone wrote:Hopefully these will be useful for others...
Am I correct in thinking these don't work in Puppy Linux 3.01?

(I'd really, really, really like them to!)

j

User avatar
jcoder24
Posts: 604
Joined: Fri 06 May 2005, 12:33
Location: Barbados

#16 Post by jcoder24 »

The files compiled by kirk22 would only work if you have the same kernel version as he does.

Running modprobe tun in puppy301 loads the module from zdrv.sfs, so puppy3 users should have this file already.

judland
Posts: 21
Joined: Thu 14 Jan 2010, 03:48
Location: Sask., Canada
Contact:

#17 Post by judland »

Phizone, thanks a bunch for the sshfs package! I've been looking for this, as it's how I connect my netbook to my home server (which contains all of my personal files).

Post Reply