I have a setup where my main router has a DNS server accessible to clients on LAN. On the outside, there will be a Wireguard tunnel on port 53, the same port as DNS. If I add an input rule for port 53 from WAN, which router service will come first? Is there a way to disallow DNS from WAN and only allow WG?
I have to use port 53 to bypass firewalls which block everything except ICMP, TCP port 80/443, and DNS. My ISP doesn’t care that much about “weird” traffic.
If WG is running on router itself, then you might have a problem … normally only one service can use a protocol/port number (e.g. TCP/53). When another service tries to acquire access to already used port, it’s denied. In linux it is possible to attach service to one of configured IP addresses and another one to same combo of protocol/port number but on another IP address.
ROS UI OTOH provides address property which might be actually used in manner similar to how src-address property is used by e.g. DST-NAT: if packet’s src address doesn’t match, then packet is queued to input chain. I guess you’ll have to try yourself.
If you’re port forwarding WG somewhere else, then it’s possible. From packet flow diagram: part of pre-routing is DST-NAT which provides information to routing decission and that one affect choice of different firewall chains (input versus forward).
BTW, never mind @rextended, he seems quite strong-minded and likes to troll whenever somebody tries to do something he doesn’t approve.
When I start to write reply, sometimes it takes some time to formulate it so that it fits the question as much as possible (trying to verify things on the go). It seems like you are much faster at writing your posts. But then, when I finished the answer and tried to post it, forum informed me that there were other posts. I reviewed them and I thought they didn't cover everything I wrote so I decided to post it anyway.
I see you are trolling again, this time about post (later than yours) essentially saying same as you did. But then, if this bothers you so much, why do you do the same occasionally? I could comlain about your posts being later than mine and saying the same a few times already. But I don't bother.
@cablenut9
Sorry, I did not noticed that you used port 53 also for WG. It is really strange and your ISP is keeping an eye on that port because of DDos attacks.
I try to explain better: is for the "troll part", I want to notice to you I already have write possibly helping solution, not one "troll post".
also @msatter say "It is really strange and your ISP is keeping an eye on that port because of DDos attacks"
and is what the same I want to say to @Cablenut9, not for bother him...
Try not to always think badly, I understand that sometimes I deserve a kick in the balls, but really this time there was nothing wrong...
Your first post in this thread (the #4) was all about why OP should not do something and nothing about how OP could achieve what he wanted to do. Even if your goal was sincere (based on yor own policy as ISP) it was still unhelpful because OP's backround is unknown to you. At the time I was writing my post it was your only post in this thread.
Since you have habit of strongly expressing your views on posters' problems (generally on this forum), I feel you're trolling occasionally. Don't get me wrong, most of your posts are very useful and some even informative (your posts tend to be terse in providing solution without explanation why the solution is good/the best). It's just they are a bit rude sometimes (I attribute that to the fact you're not native English speaker and I understand that sometimes it's hard to find appropriate word).