1

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

server 10.8.0.0 255.255.255.0

ifconfig-pool-persist ipp.txt

;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100

;server-bridge

;push "route 192.168.10.0 255.255.255.0"

;push "route 192.168.20.0 255.255.255.0"

;client-config-dir ccd

;route 192.168.40.128 255.255.255.248

;client-config-dir ccd

;route 10.9.0.0 255.255.255.252

;learn-address ./script

;push "redirect-gateway def1 bypass-dhcp"

push "dhcp-option DNS 208.67.222.222"

push "dhcp-option DNS 208.67.220.220"

client-to-client

keepalive 10 120

tls-auth ta.key 0

cipher AES-256-CBC

comp-lzo

;max-clients 100

persist-key

persist-tun

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.