You don't do dstnat for connections to the router itself. Rather you add FW rule to chain=input allowing particular connection. Something likeOk sorry for bumping but basically i check "allow remote requests" and added public IP address of that mikrotik router as dns server for "outside" computer and he cant resolve the DNS....im using RouterOS v6.40.8 ... I even made a firewall rule, chain - dstnat, protocol - udp, dst.port - 53, action - redirect, to ports - 53
/ip firewall filter
add action=accept chain=input comment="Accept DNS - UDP" port=53 protocol=udp
add action=accept chain=input comment="Accept DNS - TCP" port=53 protocol=tcp
Tried with those firewall rules (i tought if u dont set that rule it will accept automaticly !?).You don't do dstnat for connections to the router itself. Rather you add FW rule to chain=input allowing particular connection. Something likeOk sorry for bumping but basically i check "allow remote requests" and added public IP address of that mikrotik router as dns server for "outside" computer and he cant resolve the DNS....im using RouterOS v6.40.8 ... I even made a firewall rule, chain - dstnat, protocol - udp, dst.port - 53, action - redirect, to ports - 53
perhaps adding src-address=xx.yy.ww.zz to allow connections only from select remote hosts (don't forget to allow LAN hosts!).Code: Select all/ip firewall filter add action=accept chain=input comment="Accept DNS - UDP" port=53 protocol=udp add action=accept chain=input comment="Accept DNS - TCP" port=53 protocol=tcp
Are you sure your ISP is not filtering DNS requests targeted at their clients? Use torch tool and check if there are any packets targeting your public IP TCP/UDP port 53 coming to your WAN interface ...
OK, I see that you mentioned filter counters going up. However, that doesn't rule out IPS filtering. Recently we've seen on this forum a case where ISP was filtering replies rather than incoming packets. After user asked ISP about that, ISP ceased doing it (at least for that particular user).
If the torch doesn't show the responses, there is no need to talk to ISP - if ISP was blocking it, you would see the responses in torch but they wouldn't get through the ISP network to the asking PC.
So follow the instructions in my automatic signature, it must be something in your firewall settings.
Recently we've seen on this forum a case where ISP was filtering replies rather than incoming packets. After user asked ISP about that, ISP ceased doing it (at least for that particular user).
If the ISP would be blocking the queries, you wouldn't see them in torch. As you can see the queries, the ISP is not blocking them.I saw on torch packets that are hitting on WAN but that does not confirm that ISP is not blocking the DNS replays from my side. Did i miss something, am i getting this right ?
If you see packets in both directions (on one row 53 is src-port and on another row 53 is dst-port), then the ISP is filtering the responses. If you only see 53 as dst-port but never as src-port, something inside your 'Tik is wrong.
Yes, the order of the rules does matter, so without knowledge of the overall configuration, no one can suggest you what rule to add or which rule to remove or modify. So again, to get a useful advice, follow the instructions in my automatic signature....what firewall rule should i apply ? And does the place of firewall rule matter ?
Yes, the order of the rules does matter, so without knowledge of the overall configuration, no one can suggest you what rule to add or which rule to remove or modify. So again, to get a useful advice, follow the instructions in my automatic signature....what firewall rule should i apply ? And does the place of firewall rule matter ?
No rules in firewall mean everything is permitted. This is a) a very bad idea (to put it softly) on a machine with a public address on it, and b) an indication that the issue must be within routing or the DNS process itself.
Many users of this forum can supply you with many ideas. But you stubbornly ignore suggestion by @sindy to post full configuration export (obfuscated sensitive data such as public IP address, username and password) and it is really hard to point out think of all possible configuration mistakes that can be made.....im runnin out of ideas :/
/interface ethernet
set [ find default-name=ether1 ] name=ether1-Wan
set [ find default-name=ether2 ] name=ether2-Wireless
set [ find default-name=ether3 ] name=ether3-Jason
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=3des
/ip pool
add name=dhcp_pool0 ranges=192.168.84.2-192.168.84.254
add name=dhcp_pool1 ranges=192.168.84.2-192.168.84.254
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether2-Wireless lease-time=1h name=dhcp1
/ppp profile
set *0 only-one=yes
/queue simple
add disabled=yes max-limit=1M/10M name=Wireless target=192.168.84.0/24
/system logging action
set 0 memory-lines=100
set 1 disk-lines-per-file=100
/interface pptp-server server
set default-profile=default enabled=yes
/ip address
add address=192.168.84.1/24 interface=ether2-Wireless network=192.168.84.0
add address=10.0.0.1/24 interface=ether3-Jason network=10.0.0.0
/ip cloud
set ddns-enabled=yes
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=ether1-Wan use-peer-dns=no
/ip dhcp-server network
add address=192.168.84.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=192.168.84.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip firewall nat
add action=masquerade chain=srcnat comment="nat for eth3" out-interface=ether1-Wa
src-address=10.0.0.0/8
add action=masquerade chain=srcnat comment="nat for eth2" out-interface=ether1-Wa
src-address=192.168.84.0/24
add action=dst-nat chain=dstnat comment="web server" disabled=yes dst-port=80 protocol=tcp to-addr
10.0.0.10 to-ports=80
/ip route
add distance=1 dst-address=192.168.1.0/24 gateway=192.168.84.253
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=Europe/Belgrade
/system identity
set name="Mikrotik"
Nothing.... just this from the codeDynamic entries don't get into export, you can only see those using print command.
Is there anything weird if you issue command "/ip firewall filter print"?
0 X ;;; accept DNS UDP
chain=input action=accept protocol=udp port=53 log=no log-prefix=""
1 X chain=input action=accept protocol=tcp port=53 log=no log-prefix=""
2 chain=output action=accept protocol=udp out-interface=ether1-Wan port=53 log=no log-prefix=""
u mean the public ip from dns client ? here is the ip route:export only shows the static configuration elements, to see the dynamically created ones, you need to use print, and you can only print a single configuration tree leaf at a time. So post also /ip route print, and in order that it would make sense, you'll have to obfuscate only the gateway IPs; the route dst-address must remain verbatim, and you'll have to publish the address of the client from which you test.
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 ADS 0.0.0.0/0 xx.xxx.xxx.x 1
1 ADC 10.0.0.0/24 10.0.0.1 ether3-Jason 0
2 ADC xx.xxx.xxx.0/21 xx.xxx.xxx.xxx ether1-Wan 0
3 A S 192.168.1.0/24 192.168.84.253 1
4 ADC 192.168.84.0/24 192.168.84.1 ether2-Wireless 0
Another idea for using torch: when you observe incoming DNS request at your WAN port, do you see a DNS request originating RB device being targeted at either of DNS forwarders (8.8.8.8 or 8.8.4.4)? Do you see reply coming from those?
Unless reply to your own DNS request is cached at router's DNS service, you should be able to see that IP packet exchange.
Perhaps unrelated: you have configured static route towards network 192.168.1.0/24 using gateway with address 192.168.85.253. That IP address is member of DHCP address pool you're using. Either the gateway is really using DHCP-assigned address which means it can change in time (I don't see static assignment in your export) and the static route would fail ... or you've statically set up device's address but in this case you'd better choose address outside DHCP address pool to avoid potential address collision.
Can you kindly show (at least one of) IP address of a DNS client so we can (mentally) verify your routing set-up.
BTW, i did everything on fresh new clean RouterOS without any configuration (except that DNS settings, static DNS record, and DHCP client so i can get internet access)...and without any configuration he couldnt replay the DNS record outside...
/ip firewall mangle
add action=log chain=output log-prefix="step1" protocol=udp src-port=53
add action=log chain=postrouting log-prefix="step2" protocol=udp src-port=53
My RouterOS answers tcp queries just fine.And one important point - if the client is using TCP to query the Mikrotik, everything is clear, Mikrotik's DNS server doesn't support TCP queries.
What postrouting means ? cuz on mangle windows there are some packets flowing around at that step 2It's possible to miss things in torch, you can use logging rules instead:And btw:Code: Select all/ip firewall mangle add action=log chain=output log-prefix="step1" protocol=udp src-port=53 add action=log chain=postrouting log-prefix="step2" protocol=udp src-port=53
My RouterOS answers tcp queries just fine.And one important point - if the client is using TCP to query the Mikrotik, everything is clear, Mikrotik's DNS server doesn't support TCP queries.
It's after packet was routed somewhere. And it will show some you don't need to see, so try to add src-address-type=local as basic filter. In any case, when you send request from outside, you should see both steps logged for response.
They should also be logged with some details, so check if packets are going the right way, i.e. via WAN interface to client's IP address. If they do, then router is sending replies back to client correctly. And if they don't arrive, then something must eat them somewhere between you and client. But it's not easy to diagnose it when the path is not under your control.
/log print where topics~"firewall"
That sounds like logging was completely off for firewall events or other events arrive with such a pace that they kick off the older events (including those from firewall) before you issue the command. So you can run /log print follow-only where topics~"firewall" while testing the DNS to see whether the events are logged or not.The command doesnt display me anything ://log print where topics~"firewall"
They should also be logged with some details, so check if packets are going the right way, i.e. via WAN interface to client's IP address. If they do, then router is sending replies back to client correctly. And if they don't arrive, then something must eat them somewhere between you and client. But it's not easy to diagnose it when the path is not under your control.
Yes, it is.is this the proof that dns replay made out on WAN interface
Yes, it is.is this the proof that dns replay made out on WAN interface
Can it be that the "Torch" screen update time? i.e. between updates this happened hence did not show?...
I'm a bit nervous about the firewall log showing the packet but the torch not, I don't remember whether you did a sniff on the interface.
...