Answer the question
In order to leave comments, you need to log in
How to send traffic through OpenVPN to a specific IP?
Good day.
Asus router available. You need to set up an OpenVPN server on it in order to gain access to the local network, as well as to send traffic through it to specific IPs on the Internet.
The config looks like this:
daemon ovpn-server1
topology subnet
server 10.8.0.0 255.255.255.0
proto udp
port 1194
dev tun21
txqueuelen 1000
ncp-ciphers AES-128-GCM:AES-256-GCM:AES-128-CBC:AES-256-CBC
cipher AES-128-CBC
keepalive 15 60
verb 3
push "route 192.168.10.0 255.255.255.0 vpn_gateway 500"
client-config-dir ccd
duplicate-cn
tls-crypt static.key
plugin /usr/lib/openvpn-plugin-auth-pam.so openvpn
ca ca.crt
dh dh.pem
cert server.crt
key server.key
script-security 2
up updown.sh
down updown.sh
status-version 2
status status 5
push "redirect-gateway def1"
- the whole traffic goes through vpn. I try to set a specific IP - push "route IP 255.255.255.255 vpn_gateway"
- the server immediately becomes unavailable. Answer the question
In order to leave comments, you need to log in
And on the receiving side, forwarding is configured so that packets from tun are transmitted further?
this seems to need to be done on the router itself, and not in the openVPN configs, by routing, marking packets, nats, etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question