I’ve set up IPSec GRE on ethernet interface with static IP. Now I need to set up IPSec GRE in case of my ISP has PPPoE protocol for connect me to the Internet. Is it possible to set up IPSec GRE in this case on PPPoE?
yes, this works OK. it does not matter that the external connection is over PPPoE.
you must consider those two things completely separate from eachother. first configure the PPPoE, then configure IPsec.
(there is no reference to the internet interface anywhere in the IPsec configuration)
While configure GRE and IPSec, it needs the local ip address of interface from which the GRE tunnel and IPSec session is built. What should I set up as this IP address? I don’t know this address because of it is set up dynamically.
IPsec with a dynamic address is always a challenge. It can be done but not in the simple setup options, you will
need to do the fullblown setup with policies and peers, where you then can use another method of identity selection
than the usual fixed IP address.
However, the details depend on what is at the other end. (which should have a static address)
On other end is a cisco router with static ip address. Is it possible to set up such IPSec GRE with PPPoE dynamic address on mikrotik side?
I think so, yes, but I have no experience with that.
In any case you must not enter the IPsec secret in the tunnel config but instead you must configure IPsec on its own page
and then select GRE as the protocol to protect (47).
Now I have such config already. But it needs to enter local IP address in tunnel config and in IPSec config. What should I do in case of PPPoE with dynamic IP?
Set it with a script.