Using OpenVPN to export NFS in private network

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

1. Follow instruction in http://fedoraproject.org/wiki/Openvpn to set up OpenVPN server on the gateway node of your private network, and OpenVPN client on your external nodes that need to access the NFS server inside the private network behind your OpenVPN server node;

2. Start the OpenVPN server and clients, in each client nodes, add custom route to route the private network behind the OpenVPN server to device tun+;

3. Modify the iptables of the OpenVPN server to masquerade the private network to the device that your external nodes are going to connect to, start the iptables service;

4. Export the file system that you want the external nodes see in /etc/exports to the VPN network, exportfs -r and start NFS service;

5. On the external nodes, make corresponding mount points and /etc/fstab entries, and mount the NFS volumes.

This also works for communicating between the internal nodes of multiple private networks.

Be the first to comment!

Leave a Reply