I trying setup OpenVPN server. This is the network: cable modem, TP-Link router with OpenWrt Chaos Calmer 15.05.1 / LuCI 15.05-149-g0d8bbd2 Release (git-15.363.78009-956be55) 192.168.15.1 router 192.168.15.20 PC with DHCP Static Leases Ubuntu Mate 16.04 Xenial x64 It's my main machine with working samba share 192.168.15.22 virtual machine windows 7 pro sp1 x86 with DHCP Static Leases 192.168.15.254 virtual machine ubuntu server static IP address
I installed and configured OpenVRT on ubuntu server (.15.254) with help this tutorial: https://help.ubuntu.com/community/OpenVPN#Configuring_the_Server
I open port 1194 on router TCP, UDP tested and working I installed ddclient with free DNS tested and working I haven't any iptables rule, empty all 3 chain.
I can connect to the server with OpenVPN GUI from win7 virtual machine from local network. It's working everything ping other machines, connect to samba on PC (.15.20)
Outside of LAN with win7 PC & OpenVPN GUI I can connect to server, I get right IP address 192.168.15.225, I can ping the server 192.168.15.254, I can ping the client from server, and that's it, I can't do anything else. I can't ping other machines 192.168.15.1 (router) 192.168.15.20 (main machine), I can't reach samba share, I can't see other machines under network browsing.
What is the problem and why can't working properly:
under the config files: interfaces, down.sh, up.sh, server.conf, client.ovpn:
auto lo br0 iface lo inet loopback iface br0 inet static address 192.168.15.254 netmask 255.255.255.0 gateway 192.168.15.1 broadcast 192.168.15.255 dns-nameservers 192.168.15.1 184.108.40.206 bridge_ports eth0 iface eth0 inet manual up ip link set $IFACE up promisc on down ip link set $IFACE down promisc off #virtualbox virtualis gep miatt kell az alabbi 4 bridge_fd 9 bridge_hello 2 bridge_maxage 12 bridge_stp off
#!/bin/sh BR=$1 DEV=$2 /sbin/brctl delif $BR $DEV /sbin/ip link set "$DEV" down
#!/bin/sh BR=$1 DEV=$2 MTU=$3 /sbin/ip link set "$DEV" up promisc on mtu "$MTU" /sbin/brctl addif $BR $DEV
mode server tls-server local 192.168.15.254 ## ip/hostname of server port 1194 ## default openvpn port proto udp #bridging directive dev tap0 script-security 2 ## allow calling up.sh down.sh up "/etc/openvpn/up.sh br0 tap0 1500" down "/etc/openvpn/down.sh br0 tap0" persist-key persist-tun #certificates and encryption ca ca.crt cert server.crt key server.key dh dh2048.pem tls-auth ta.key 0 cipher BF-CBC comp-lzo #DHCP Information ifconfig-pool-persist ipp.txt server-bridge 192.168.15.254 255.255.255.0 192.168.15.225 192.168.15.235 push "dhcp-option DNS 192.168.15.1" push "route 192.168.15.1 255.255.255.0" push "redirect-gateway def1 bypass-dhcp" max-clients 10 #log and security user nobody group nogroup keepalive 10 120 status openvpn-status.log verb 3
### Client configuration file for OpenVPN # Specify that this is a client client # Bridge device setting dev tap # Host name and port for the server (default port is 1194) # note: replace with the correct values your server set up remote ***server url*** 1194 proto udp # Client does not need to bind to a specific local port nobind # Keep trying to resolve the host name of OpenVPN server. ## The windows GUI seems to dislike the following rule. ##You may need to comment it out. resolv-retry infinite # Preserve state across restarts persist-key persist-tun # SSL/TLS parameters - files created previously ca ca.crt cert pisti.crt key pisti.key # Since we specified the tls-auth for server, we need it for the client # note: 0 = server, 1 = client tls-auth ta.key 1 # Specify same cipher as server cipher BF-CBC # Use compression comp-lzo # Log verbosity (to help if there are problems) verb 3