Answer the question
In order to leave comments, you need to log in
How to set up OpenVPN routing on OpenWRT?
Hello experts!
The crux of the matter is this.
There is a tp-link 1043 v2 router with openWRT and openVPN installed. 192.168.200.1.
There is also a grid 192.168.201.x\24 without DHCP
The grid is connected to the 4th port of the router 1043.
The openvpn server is up and running on the router. 10.0.0.0 255.255.255.0
The client connects to the server and gets an address from the network above.
How can I connect port 4 and the vpn server on the router so that I can have VPN access to this network from anywhere? There are free addresses on the network from 192.168.201.240 and higher.
Create a vlan and an interface on port 4 and set up routing between it and the openvpn server?
I can not understand how and how to register the firewall settings.
server
config openvpn lan settings
option enable 1
option port 1194
option proto udp
option dev tun
option ca /etc/easy-rsa/keys/ca.crt
option cert /etc/easy-rsa/keys/server.crt
option key /etc/easy-rsa/keys /server.key
option dh /etc/easy-rsa/keys/dh2048.pem
option ifconfig_pool_persist /tmp/ipp.txt
option keepalive "10 120"
option comp_lzo no
option persist_key 1
option persist_tun 1
option status /var/log/openvpn- status.log
option verb 3
option server "10.0.0.0 255.255.255.0"
option client_to_client 1
list push "dhcp-option DNS 192.168.200.1"
list push "route 192.168.200.0 255.255.255.0"
client settings
client tls-client
dev tun
proto udp
remote MY EXTERNAL IP 1194
resolv-retry infinite
nobind
ca ca.crt
cert client1.crt
key client1.key
dh dh2048.pem
persist-tun
persist-key
verb 3
firewall
config include
option path '/etc /firewall.user'
config rule
option target 'ACCEPT'
option name 'VPN'
option src 'wan'
option proto 'udp'
option dest_port '1194'
firewall user
iptables -t nat -A prerouting_wan -p udp --dport 1194 -j ACCEPT
iptables -A input_wan -p udp --dport 1194 -j ACCEPT
iptables -I INPUT -i tun+ -j ACCEPT
iptables -I FORWARD -i tun+ -j ACCEPT
iptables -I OUTPUT -o tun+ -j ACCEPT
iptables -I FORWARD -o tun+ -j ACCEPT
Answer the question
In order to leave comments, you need to log in
Did I understand correctly that you need access to the 192.168.201.0\24 subnet for the OpenVPN client?
Is the 192.168.200.0 subnet available to the client?
If so, then you just need to push the route to this subnet on the ovpn server:
What kind of strange option before the parameters on the server, is this the syntax of openWRT? Thenlist push "route 192.168.201.0 255.255.255.0"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question