The OpenVpn server is configured. When connecting, the client receives the address from the network 10.7.0.0/24 You need to connect to the postgres database located on the remote server: 10.20.30.40 Settings on the client, after connecting to the VPN:
tun1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:10.7.0.6 PtP:10.7.0.5 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) $ ip route default via 192.168.43.1 dev wlp1s0 proto static metric 600 10.7.0.1 via 10.7.0.5 dev tun1 10.7.0.5 dev tun1 proto kernel scope link src 10.7.0.6 10.20.30.0/24 via 10.7.0.5 dev tun1 169.254.0.0/16 dev wlp1s0 scope link metric 1000 192.168.43.0/24 dev wlp1s0 proto kernel scope link src 192.168.43.204 metric 600 Ie all calls to 10.20.30.40 go into the tunnel. Further connection to the database itself: psql -p 1234 -h 10.20.30.40 -U ubuntu test_BD Does not work. If I go through VPN to 10.7.0.1 and from there I execute the same command, then everything opens - that is, there already everything goes farther correctly. Where could the problem be?
10.7.0.0/24. Now from the host10.7.0.1- the command is executed, as I wrote. By pg_hba.conf - could you describe in more detail in the answer, where can there be a plug? - Dofri