Page 1 of 1

please help how to route openvpn client to local lan on server openvpn

Posted: Thu Sep 21, 2023 10:12 am
by kookkai69
please help how to route openvpn client to local lan on server openvpn

i have Server Alimalinux8 with 2 eth
eth0 use publicip address and install openvpn server on this interface
eth0 ip 116.116.116.116 and can access on internet
tun0 10.8.0.1/24 ( for openvpn )

eth1 user private ip 192.168.22.250/24 without gateway and plug to private switch and server can access or ping to other server on this interface eg 192.168.22.101

my client user openvpn
ip address 10.8.0.2

My client pc can access or ping to
public ip 116.116.116.116
eth1 192.168.22.250

but other ip on 192.168.22.0/24 can't access

how to route openvpn client to via eth1

server config
local 116.116.116.116
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
tls-crypt tc.key
topology subnet
server 10.8.0.0 255.255.255.0
push "route 192.168.22.0 255.255.255.0"
push "redirect-gateway def1 bypass-dhcp"
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 1.1.1.1"
push "dhcp-option DNS 1.0.0.1"
push "block-outside-dns"
keepalive 10 120
cipher AES-256-CBC
user nobody
group nobody
persist-key
persist-tun
verb 3
crl-verify crl.pem
explicit-exit-notify
client config
client
dev tun
proto udp
remote 116.116.116.116 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
ignore-unknown-option block-outside-dns
verb 3