Hello,
I am new to this forum, and kind of new to OpenVPN so excuse me if my questions seem nonsense.
I have searched and I did read all what I can find before posting here, and all the posts I have found helped me more and more but I still have one problem with my OpenVPN bridge mode setup that is still not working.
I have managed to create a server with a raspberry pi, and I can connect my android mobile client to it. The initial server was a tunnel setup.
What i am trying to use the VPN for , is the following:
I have a PSTN wireless phone at home, this one :
http://shop.panasonic.com/support-only/KX-PRW120W.html
This model connects to the land line and the handset connects also to WiFi.
With a specific application on my android phone (Smartphone Connect), i can make land line calls from my cellphone as long as i am on the same wifi as the handset.
I was thinking that If I can achieve a full vpn bridge between my mobile android outside home (while on other wifi or 3g connection) and the raspberry pi openvpn server at home, I was thinking that the Smartphone Connect application will automatically connect to the handset, and that i can receive or call using my land line while out of home.
As per my readings, I have found out that a tunnel setup would not allow everything on the network , referring to this text :
I would recommend using routing unless you need a specific feature which requires bridging, such as:
the VPN needs to be able to handle non-IP protocols such as IPX,
you are running applications over the VPN which rely on network broadcasts (such as LAN games), or
you would like to allow browsing of Windows file shares across the VPN without setting up a Samba or WINS server.
from the howto page
https://openvpn.net/index.php/open-source/documentation/howto.html#vpntype
So I decided to change my setup to bridge mode.
Again from the howto page, I have read that there are two methods for the bridge mode :
Let OpenVPN manage its own client IP address pool using the server-bridge directive, or
configure the DHCP server on the LAN to also grant IP address leases to VPN clients.
I have managed to make the first method work for me. And i have installed the pro version of vpn client to enable the tap mode. Now I can ping all the IP on my home network, I can see all of the IPs on my network and i can connect to the internet while my android phone in on VPN. But still, I cannot get the Smartphone Connect app to connect with the handset.
In the app, where i can setup the base to connect to, If i run a search for the base, the app won't find anything. Now if i point the app to look on a specific ip ( 192.168.0.103 which is reserved to my handset by my wimax router / dhcp server ) , the app can see the handset and displays its mac address (all while i m out of home and connected via 3g or wifi through vpn ) but despite seeing it , when i click on the mac address to connect to it, the app won't connect.
I have tried many option using the push dhcp-option , push gateway, bypass-gateway but none of this worked.
What would be the problem ? Is it something like the handset use a special protocol or a special port to communicate with my android phone and the OpenVPN is blocking this protocol or this port ?
Would the other method of bridging (letting my dhcp server assign IPs for the VPN clients) present any benefits over the method I am using ?
my home setup is a wimax router acting as a dhcp server and a gateway : 192.168.0.1
I have a real fixed ip that I am using as my public ip to connect to the server from outside and of course i have set port 1194 forwarding on my router to 192.168.0.250 (vpn server).
The DHCP server can assign IPs between 192.168.0.101 and 192.168.0.130
The raspberry pi is running on a static IP 192.168.0.250, but since i changed the server.conf file to the bridge mode, It is using a second ip now , assigned by the dhcp server within the above specified range. (i can connect to the raspberry pi using any of the 2 Ips).
my server.conf file is :
dev tap0
proto tcp
port 1194
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/VPN_Server.crt
key /etc/openvpn/easy-rsa/keys/VPN_Server.key
dh /etc/openvpn/easy-rsa/keys/dh2048.pem
server-bridge 192.168.0.1 255.255.255.0 192.168.0.240 192.168.0.249
push "dhcp-option DNS 192.168.0.1"
push "redirect-gateway def1"
keepalive 10 120
tls-auth /etc/openvpn/easy-rsa/keys/ta.key 0
cipher AES-128-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status /var/log/openvpn-status.log 20
log /var/log/openvpn.log
verb 1
my clinet configuration is :
client
dev tap0
proto tcp
remote XXX.XXX.XXX.XXX 1194
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ns-cert-type server
key-direction 1
cipher AES-128-CBC
comp-lzo
verb 1
mute 20
Any help would be appreciated.