fix server client ping

what I've done it's the simply start open vpn server with the simple gui wizard interface like I've attached in this post, nothing else, once that, I've exported the .ovpn config file in the client side. Now my question is: why I'm be able to ping from client to server and not the reverse? the two small router that I'm using server side and client side are the same. there's any standard guide to fix it? I really appreciate your suggestion but are unuseful to fix it untill now. for the advanced options I really don't know how to do it.

no idea how to use iroute option :frowning:

Let's see the configs then (from both devices):

uci show network; uci show firewall ; uci show openvpn; \
ip -4 addr; ip -4 ro; ip -4 ru; \
iptables-save -c

this is server side ---> https://pastebin.com/K6G7RxXM

this is client side ---> https://pastebin.com/7ZNcenpB

firewall.vpn_server_zone.masq='1'

What is the reason for NATing the VPN traffic?

OpenVPN configuration is not there. Find where you stored it and paste it again here.

Also on server there is no route for 192.168.5.0/24 which is the client's LAN.

The same remarks apply for the client too.

could you please paste the ssh command to do it? I've done what you've asked

here the example to explain better my situation, thanks in advance who can help to fix it.

Yes, you should use iroute option in OpenVPN: https://community.openvpn.net/openvpn/wiki/RoutedLans

2 Likes

The ssh command to do what?
The OpenVPN configuration is not in the /etc/config/openvpn where it normally is.
You can try to look if it is inside /etc/openvpn and paste it here.

  • You didn't answer my question why have you enabled the masquerade in the vpn zone.
  • You didn't answer my question why have you enabled the masquerade in the vpn zone.
    maybe a mistake, i don't know how to restore this value?

this the content about the .ovpn file that i'm currently using in client side: i mask the server ip with xxx

client
dev tun
proto udp
remote 79.1.192.xxx 1194
resolv-retry infinite
nobind
persist-key
persist-tun
auth SHA1 
cipher BF-CBC
comp-lzo adaptive
nice 0
mute 5
verb 3
<ca>
-----BEGIN CERTIFICATE-----
MIIC/TCCAeWgAwIBAgIJAKNItkjp0PjhMA0GCSqGSIb3DQEBBQUAMBUxEzARBgNV
BAMMCk9wZW5WUE4gQ0EwHhcNMTkxMjA3MTgyMTUxWhcNMjkxMjA0MTgyMTUxWjAV
MRMwEQYDVQQDDApPcGVuVlBOIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
CgKCAQEAq6ldg/E63elmi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J04GisNHCsES5Cue8OcjNw+uk/wBVV5h6GDuBvYisILJM17O0H
xOOG7kFSAfDV9VXINiIJDeiTGBQxTTL/xLc4u/ICYQKBgHhN+xFUewBsIWI/j90h
nqgQkithzum0XCqrbz4fSt+D4txw3U4zZOfynYPP4sVIfadqZF/L1hlrf4Q7bDWr
Nm2stxzjWqMvpdxM8gZujxM+2B4ra++zbPgGTEnm5SmbtmB69t9Ri682JVvXVcb6
0HCRWLVdcjAtHANPlKSODW7q
-----END PRIVATE KEY-----
</key>

this is also the server side situation:

while this in client side:

He asks you about firewall configuration of zones. See firewall configuration. I suppose, you have 'masq' option on vpn-zone on client, it should be only on client.

maybe in this server side i need to add something to ping 192.168.5.x client lan side ?



I've answered you, what you should do.

i become crazy :cold_sweat: so many post and no idea to fix it i think that it's easy for a mod or someone developer about open wrt firmware while it's so hard for all to fix it... maybe you also don't have any idea to a working solution?

this is the firewall client config... i put everything accept ....

Is it client, everything is OK. The question of @trendy was about 'masq' option on server. It should not be set on server. But my recommendation is correct, you haven't done it. So I don't understand your question. The problem is in routing.

could you please explain me again in different words? i'm a noob in it and it's quite hard to apply your suggestion.

  1. Check option 'masq' in config or tick 'Masquerading' on web-interface on server near vpn-zone, it should NOT be set (@trendy).
  2. See manual by link above, you should do ONLY ON SERVER:
    2.a Modify server config for OpenVPN.
    2.b Create ccd directory in /etc/openvpn
    2.c Create file with name of client in ccd directory, and insert string containing iroute in it.
  1. ok I've unchecked 'Masquerading' near the vpn but still the same also rebooted both

  2. i've done server by wizard mode, and first to do a restore and start it in a manual way i dont'know... because vpn is working at 90% i have internet access from client lan also when i ping server lan side, if i check my public static ip from client lan side i see the correct one (server side public static ip) the only thing that is wrong is that i can't ping client lan side that's all.