Ping LAN ip from the tunnel

I'm connected to the internet and I'm connected to vpn via l2tp in my openwrt default protocols

Normally the ppp-up script on openwrt makes changes and sets the default operating system route to vpn
But I set the default route on them myself and use the vpn routing policy to pass clients through the vpn path

So far, so good
That is, the route is set to wan before the operating system, and clients pass through the vpn path
But besides all this, I want to be able to ping from the other side of the tunnel, ie from the vpn server, in any way possible (I have ping clients because they pass through the vpn path)
I need guidance for this

I don't understand what you mean with all these. It would be simpler to answer my questions. It matters a lot in vpn-pbr if the vpn is server or client and it must be configured accordingly.


Maybe it would be better if I explained like this
How can I have a virtual dhcp client on opemwrt?
Is there such a possibility at all?

I haven't heard of a virtual dhcp client before. There is dhcp client udhcpc

1 Like

I mean can I get dhcp ip on lan openwrt from itself?

Do you mean to run one interface with static protocol and dhcp server enabled, and one interface with dhcp client protocol, on the same physical interface? Technically you can, however I don't see how the server will receive the dhcp discovery packet that the client will broadcast to the interface.

1 Like

I made changes and was able to achieve my goal by setting iptable
like this

iptables -t mangle -I OUTPUT -p icmp -g VPR_MARK0x010000

But at the moment my problem is that I only have the ping VPR_MARK0x010000
Can I set up to ping two VPR_MARKs?

Appending (with -A) the iptable command for VPR_MARK0x030000 also did not solve my problem

No, only one.

1 Like

You mean, like, there's no way I'll ping both of them?

I mean that you can apply one mark which will be matched by an IP rule to be assigned to a specific routing table.