I working with two VMs in virtualbox. Both of them are in one Subnet 10.0.2.0
. On first VM I run client.conf and on other VM run server.conf and startup Apache Server. OpenVPN tunnel established successfully. But I want to make all traffic in client go through the VPN tunnel. For testing this, I use port-share with Apache server port, open firefox browser and try to connect https://10.0.2.5:4433
. But error unreachable
occured. Unfortunetlly I cann't find problem.
here is my server.conf (with ip : 10.0.2.5
):
#Network Configuration
mode server
proto tcp-server
dev tun
topology subnet
ifconfig xxxx 255.255.255.0
port 1194
port-share 10.0.2.5 4433
user nobody
group nogroup
persist-key
persist-tun
keepalive 10 120
dh none
# Control Configuration (Crypto)
tls-server
tls-version-min 1.3
tls-version-max 1.3
ca /home/files/ca.crt
cert /home/files/server.crt
key /home/files/server.key
tls-ciphersuites TLS_AES_256_GCM_SHA384
# Select a cryptographic cipher and Authentication in network.
cipher AES-256-GCM
verb 5
push "redirect-gateway local def1"
push "route 10.0.2.5 255.255.255.0"
and client.conf (with ip : 10.0.2.5
):
#Network Configuration
;client
proto tcp-client
dev tun
pull
remote 10.0.2.5
port 1194
user nobody
group nogroup
persist-key
persist-tun
keepalive 10 120
# Control Configuration (Crypto)
tls-client
tls-version-min 1.3
tls-version-max 1.3
ca /home/ca.crt
cert /home/client.crt
key /home/client.key
tls-ciphersuites TLS_AES_256_GCM_SHA384
# Select a cryptographic cipher and Authentication in network.
cipher AES-256-GCM
verb 5
redirect-gateway local
dhcp-option DNS 10.0.2.5
Thanks in advance, hope you can help.