Been struggling with this issue for weeks and now I’m out of options and hope you can help me. So one of clients wants to have an IPSEC site-to-site tunnel and he has this PaloAlto device.
Clients WAN IP: 80.90.100.200
Clients VLAN IP: 10.124.0.0/16
My WAN IP: 8.9.10.20
My Lan: 192.168.88.0/24
But my client has also requested that all the traffic through the tunnel has to be translated to one specific IP address - 10.20.30.9 (
/ip ipsec policy set 0 dst-address=10.124.0.0/16 src-adress=10.20.30.9/32
)
So what I did so far:
First I thought: “nah I’m not gonna play with NATing” and just created a 10.20.30.0/24 subnet and set 10.20.30.9 as gateway and created a simple NAT (
. The tunnel was up but nothing went through it. Client said that he can see my ICMP packets, but I never recieved any replay. So I went to client office and tried to ping 10.20.30.9 at first I didn’t get anything, but I noticed that my Mikrotik is dropping packets from 80.90.100.200 as soon as I opened firewall for clients WAN IP the ping from clients office went through ( I still can’t wrap my head around this - why on earth did it need a hole in firewall?). However ping from my office to clients office still didn’t go through.
Then I reset my Mikrotik left the default settings, created the tunnel (which is up), created 10.20.30.9 attached it to ether5-slave-local Interface and created NAT (
As I posted this code I noticed the issue. Fixed it (also fixed it in posted code here). So now tunnel is up, PING goes through in any direction, but port 80 does not. Any rule I should apply to my Firewall?
I’m actually not sure whom to blame for that issue - me for not reading manuals (probably touched something that shouldn’t be touched) or maybe it’s a Mikrotik bug:
I usually do the configuration through Winbox GUI not terminal. And if you open IP IPsec policy, there is by default a blue colored entry and everything is set to 0 there. I edited that. The result was quite strange in Winbox GUI I could see that every setting was as it should be, but as soon as I exported I got this:
And of course that meant that my tunnel wasn’t even working it died at phase 2.
Now for the port issue:
The pinging is done from a laptop inside 192.168.88.0/24 network. I can ping 10.124.10.10. I can kinda get something back from it via port 80 - it shows the web page header, but that’s it.
The device (10.124.10.10) is also a Mikrotik router which does some port forwarding to a webserver. On site (inside the 10.124.0.0 network) everything works just fine - I can connect to that router via Winbox (port 8921) and the port forwarding also works just fine.
From PaloAlto router reports show some strange Session End Reasons like: tcp-rst-from-client or tcp-fin (whatever that means).
Default blue entry is template, indicated by T flag in winbox. Template is not the same as policy. More info on policies and policy templates are in the manual.
This is very strange. By connecting to the 10.124.10.10 ( to port 80) I can get header from the web page, but nothing more. If try to connect to the router it self (to port 8921) it takes forever, it never gives any errors or anything, it just tries to connect for hours and nothing happens. I have no more ideas… Should I call for exorcist?
you should remove default configuration when ever you configure mikrotik and do it from scratch.
Try changing:
Dns to point to google disable remote request thats important
remove default firewall config
change ip sec peer to 0.0.0.0/0 and enable Nat traversal, change policy to port override
and what kind of VPN is that l2tp or ? if so use main l2tp exchange mode. And check whats your MTU
You have to calculate precisely how much mtu you need, you can’t add random numbers for it.
Remove all the default config you have for firewall, your configuration is not so much clean.
OK, today I found out that my MTU is stunningly low (done some -f -l pinging) 1272+28=1300. Now I’ve kinda followed the instructions written by gsloop and added mangle:
Fasttracked packets bypass firewall, connection tracking, simple queues, queue tree with parent=global, ip traffic-flow(restriction removed in 6.33), ip accounting, ipsec, hotspot universal client, vrf assignment, so it is up to administrator to make sure fasttrack does not interfere with other configuration