S
S
Sergey Gulin2019-12-16 12:31:39
linux
Sergey Gulin, 2019-12-16 12:31:39

How to let traffic from apache out of VPN?

Good day colleagues, a vpn is connected on an external server for monitoring inside the network, apache2 is installed on the same server, it turns out that now all traffic goes through the network, how can I let port 80 and 443 outside openvpn. Maybe there is a solution in openVPN or just NAT?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Talyan, 2019-12-16
@Josers

in OpenVPN, routes are specified in the configuration file. Or no?
I have so:
блааа бла блааа
ns-cert-type server
route-method exe
route-delay 2
comp-lzo
;route-nopull
route 172.17.172.1 172.17.172.49
route 172.17.172.49 255.255.255.255
route 192.168.0.0 255.255.255.0 172.17.172.49
route 192.168.2.0 255.255.255.0 172.17.172.49
route 192.168.1.0 255.255.255.0 172.17.172.49
route 192.168.6.0 255.255.255.0 172.17.172.49
route 192.168.10.0 255.255.255.0 172.17.172.49
push "block-outside-dns"
push "redirect-gateway tun0"
push "dhcp-option DNS 192.168.2.5"
Well, you write down the route there, only the one that goes to the monitoring server. And let the default route remain so through the real interface, and not tun0.
Then the monitoring will break through the VPN to your server. And your server, in turn, will know that the route to monitoring goes through the tunnel.
And the rest of the traffic will go through the regular Internet.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question