Community discussions

MikroTik App
 
AlejandroRh
just joined
Topic Author
Posts: 4
Joined: Sat Feb 10, 2024 10:02 pm

2 WAN with port forwarding fail

Sat Feb 10, 2024 10:43 pm

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
 
User avatar
BartoszP
Forum Guru
Forum Guru
Posts: 2893
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: 2 WAN with port forwarding fail

Sat Feb 10, 2024 11:39 pm

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.
 
Mesquite
Member
Member
Posts: 420
Joined: Tue Jan 23, 2024 9:16 pm

Re: 2 WAN with port forwarding fail

Sun Feb 11, 2024 8:45 pm

Have you thought of using a native VPN service already available on the mikrotik router aka Wireguard??
 
AlejandroRh
just joined
Topic Author
Posts: 4
Joined: Sat Feb 10, 2024 10:02 pm

Re: 2 WAN with port forwarding fail

Sun Feb 11, 2024 10:00 pm

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.
 
AlejandroRh
just joined
Topic Author
Posts: 4
Joined: Sat Feb 10, 2024 10:02 pm

Re: 2 WAN with port forwarding fail

Mon Feb 12, 2024 11:50 pm

So finally its working and the only i do its add this config:

/ip route rule
add dst-address=9.9.9.9/32 routing-mark=to_WAN1 table=to_WAN1
add dst-address=9.9.9.9/32 routing-mark=to_WAN2 table=to_WAN2
 
User avatar
nichky
Forum Guru
Forum Guru
Posts: 1291
Joined: Tue Jun 23, 2015 2:35 pm

Re: 2 WAN with port forwarding fail

Tue Feb 13, 2024 3:39 am

what is 9.9.9.9/32
it is your public ip?

just asking
 
tangent
Forum Guru
Forum Guru
Posts: 1422
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: 2 WAN with port forwarding fail

Tue Feb 13, 2024 2:21 pm

what is 9.9.9.9/32

It’s Quad9.

Who is online

Users browsing this forum: No registered users and 1 guest