Hi there.
I am trying to connect my linux device to my opnserver. Unfortunately my linux device's port never matches and thus never do handshake.
OPNsense config
(https://i.postimg.cc/qv43BLLL/Screenshot-from-2021-11-14-15-31-22.png)
Endpoint config
(https://i.postimg.cc/QMMK1dvK/Screenshot-from-2021-11-14-15-34-22.png)
Linux device wg0.conf
(https://i.postimg.cc/9fNRpjj8/Screenshot-from-2021-11-14-15-35-51.png)
First I have tried without ListenPort, thus it was running at random port on linux device.
When I see OPN senses config, I see below.
(https://i.postimg.cc/rwjtDrZL/Screenshot-from-2021-11-14-15-34-59.png)
For example in this case it's trying to connect back port 44000.
If I intentionally change to 44000 in Linux device with ListenPort declaration, OPNsense's endpoint's port will change to random port.
What could be the issue. I have allowed 52820 on firewall. Thanks in advance.
What does your outbound NAT rule look like? If you manually created tge NAT rules snd NAT "everything" instead if e.g. "LAN net", that can happen.
My NAT outbound is by default.
(https://i.postimg.cc/c4QYfH4X/Screenshot-from-2021-11-14-16-59-11.png)
Not sure what they means hopefully useful for you.
(https://i.postimg.cc/tg5G6FLp/Screenshot-from-2021-11-14-17-08-16.png)
44027 is the port showing in list configuration
(https://i.postimg.cc/h4xWbWF2/Screenshot-from-2021-11-14-17-13-09.png)
You have a public IP in Mongolia? Would not post it here...
Looks like the tunnel is up, according to the last screenshot. Maybe some FW rules missing on WG interface to make traffic flow?
OK, so it's the other end that is misbehaving. You need to check the NAT and/or the WireGuard configuration there.