I am using softether on a VPS elsewhere and a PfSense 2.1.4 release 16.
I am using the pfsense as tun client agains the softether and it connects, give a virtual ip from the server and everything is fine. But my pfsense is a gateway for a lan and i want to use this vpn as "gateway" to connect to reach another clients connected to sofether vpn.

The strange is, from the pfsense after i connect using the ping tool i can ping the vpn clients on the softether network but from my lan no.
I followed this tutorial https://forum.pfsense.org/index.php?topic=76015.0 and in ym case it is non working, well it is working but it is not doing routing.

To make the things more strange, after i configured the interface for the openvpn client connection, i lost connectivity between the openvpn server running on the pfsense and the lan, i configured the rules but it seems doesnt work.

I guess the upstream OpenVPN server at 10.10.30.254 is pushing routes for 10.10.20.0/24 and 10.10.40.0/24 to the pfSense OpenVPN client. That is how pfSense knows to route there.

On LAN you have the rule straight after anti-lockout that is policy-routing (=forcing) all traffic to gateway WAN_DHCP. So even though the pfSense routing table knows how to get to 10.10.20.0/24 and 10.10.40.0/24, the policy-routing rule is overriding that.

Since the routing table seems to have all the necessary routing information, you should not need to specify a gateway in any rules. Try removing "WAN_DHCP" from that rule - it might all just work.

If it turns out to be needed, you can assign an interface for that uplink-VPN and it will get a gateway. You can put rules before the "Allow all on LAN" rule, and make those rules pass source LANnet destination 10.10.20.0/24 and 10.10.40.0/24, gateway uplink-VPN-GW. That will force that traffic into that VPN.

I tried what you did but it seems doesnt work, if i try to run a traceroute to one of the hosts of this networks, it ends using the default gateway instead the openvpn client
I tried to remove every route-pushing from the softether side to prevent route pushing and it doesnt work.
After i connect using "tun", i got this in the logs.

Again, pings now from the interface assigned as gateway to the vpnclient works (VPNESA) and even a ping from the LAN to the ip assigned by the openvpn client, in that case 10.10.30.17, which is the LAN side of the vpn connections, works.
It seems something is not routing from or just the ack from the other side (but if it works to another LAN connected to this gw, like 10.10.40.254, it should be the same for the 10.10.30.254 (.254 are the gw between networks or virtual hubs that name Softether linked using a L3 Virtual switch)

It seems something is not routing from or just the ack from the other side (but if it works to another LAN connected to this gw, like 10.10.40.254, it should be the same for the 10.10.30.254 (.254 are the gw between networks or virtual hubs that name Softether linked using a L3 Virtual switch)

So you can reach 10.10.40.254 OK?
and 10.10.20.254?

10.10.30.254 is in the tunnel - I do not expect you can ping that, the OpenVPN server at the other end is just giving your pfSense client 10.10.30.17 to 10.10.30.18