Page 1 of 1

2 WAN with port forwarding fail

Posted: Sat Feb 10, 2024 10:43 pm
by AlejandroRh
Hello, first of all, sorry if I write something wrong, I'm learning English and using google translate :?

I am completely stuck with this, I need to configure 2 wan with 1 lan network on mikrotik, I have followed this tutorial-guide and both connections work for me.
https://wiki.mikrotik.com/wiki/Manual:PCC#NAT

The problem is that I need to open port 443 on both wans but it only works on the first wan, well all ports work but only on the first wan.
If I try to open any port on the second wan it just doesn't work.

The router has exactly the link configuration with my ip range and WAN names but nothing more, I must be doing something wrong but I can't figure out what. I've seen a lot of threads here but I had to register to ask for help.

What I basically need is to be able to access from wan 1 to ip 192.168.1.2:443 and from wan 2 to ip 192.168.1.3:443 (one is for VPN and other for SSL service)
I know I could change the VPN connection but I need it to work with that at the moment

Sorry again for the english

Re: 2 WAN with port forwarding fail

Posted: Sat Feb 10, 2024 11:39 pm
by BartoszP
Both works but the router sends the answer received with 2'nd WAN via the main one (1'st) which is chosen as default out interface.
You should mark connections with source and then send the traffic back via the proper interface.

Searched for topics and the one you can start with is viewtopic.php?t=148479 to see the idea.

Re: 2 WAN with port forwarding fail

Posted: Sun Feb 11, 2024 8:45 pm
by Mesquite
Have you thought of using a native VPN service already available on the mikrotik router aka Wireguard??

Re: 2 WAN with port forwarding fail

Posted: Sun Feb 11, 2024 10:00 pm
by AlejandroRh
Both works but the router sends the answer received with 2'nd WAN via the main one (1'st) which is chosen as default out interface.
You should mark connections with source and then send the traffic back via the proper interface.

Searched for topics and the one you can start with is viewtopic.php?t=148479 to see the idea.
I'll try it tomorrow and see, but isn't there an easy way to do this? I don't think what I'm trying is very complicated but I see many threads on this topic.
Have you thought of using a native VPN service already available on the mikrotik router aka Wireguard??
That is the second option but I would have to configure the VPN on all the client's computers and there are a few so at the moment I would prefer not to do it.

Re: 2 WAN with port forwarding fail

Posted: Mon Feb 12, 2024 11:50 pm
by AlejandroRh
So finally its working and the only i do its add this config:

/ip route rule
add dst-address=192.168.100.1/24 routing-mark=to_WAN1 table=to_WAN1
add dst-address=192.168.120.1/24. routing-mark=to_WAN2 table=to_WAN2

Re: 2 WAN with port forwarding fail

Posted: Tue Feb 13, 2024 3:39 am
by nichky
what is 9.9.9.9/32
it is your public ip?

just asking

Re: 2 WAN with port forwarding fail

Posted: Tue Feb 13, 2024 2:21 pm
by tangent
what is 9.9.9.9/32

It’s Quad9.