I am looking for a way to set up my OpenVPN server so that all my internet trafffic redirects through it, and I can access my Samba Share through it. My samba share is located on my server machine, which is a WIndows XP. Ideally, I should also be able to reach my printer. The hosts that may connect are iOS, Linux, Windows 7, and possibly Android.

Note: I would like to avoid dev tun as iOS doesn't support it.

OpenVPN configuration file:

port 80

proto udp

:dev tap

dev tun

;dev-node MyTap

ca ca.crt

cert xxx.crt

key xxx.key

dh dh2048.pem

;topology subnet


ifconfig-pool-persist ipp.txt



;push "route"

;push "route"

;client-config-dir ccd


;client-config-dir ccd


;learn-address ./script

;push "redirect-gateway def1 bypass-dhcp"

push "dhcp-option DNS"

push "dhcp-option DNS"


keepalive 10 120

tls-auth ta.key 0

cipher AES-256-CBC


;max-clients 100



verb 3

;mute 20

  • Looks like you've got a good start with OpenVPN. What specific problems are you having with that configuration? Do you have the server installed? Do you have the keys setup? Do you have the client installed and configured? Can the clients connect? Please provide more details. – heavyd Jan 19 '15 at 15:38
  • Keys are setup. Clients are configured, and the server is installed. Everything works okay on the server. I'll do further testing later. – QuyNguyen2013 Jan 19 '15 at 15:40
  • why and how are you having a samba share on windows?! AFAIK Windows uses SMB.. and Linux uses Samba.. Samba AFAIK is for linux systems to simulate windows file sharing. – barlop Jan 19 '15 at 15:51
  • @barlop Oh, I was transferring my network drive from my router, and I must have gotten the names mixed up. – QuyNguyen2013 Jan 19 '15 at 15:58
  • I have done a VPN on Win7. I think you get an IP from that network you connect to. And so if at the end where the VPN server is, you have a some windows file sharing servers set up, or linux samba servers set up, and computers on your LAN can access it, then the computer you connect remotely should be able to access it. It's effectively on your LAN. You should find you can ping and access any servers. – barlop Jan 26 '15 at 23:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.