Page 1 of 1

static DNS

Posted: Sat Sep 17, 2011 9:41 am
by ripken204
I am trying to set up some Static DNS entries and am having problems getting it to work
I have created the entries but they are not redirecting to the correct internal IP addresses

here's an example of my setup:

server1.mywebsite.com -> 192.168.0.2
server2.mywebsite.com -> 192.168.0.3
server3.mywebsite.com -> 192.168.0.4

I did try redirecting all port 80 traffic to 192.168.0.2 which did work... but for ALL port 80 traffic. i could not access server2 or server3.

As far as the static dns goes, is there anything else i need to change/add, such as something in the firewall?

static DNS

Posted: Sat Sep 17, 2011 9:54 am
by dlabreu
Hi there flush your DNS , there is place to click on the DNS that will flush it and then you see if your DNS enteyrs work

Thanks

Re: static DNS

Posted: Sat Sep 17, 2011 9:57 am
by ripken204
i actually had to flush my DNS in windows, then it worked just fine

static DNS

Posted: Sat Sep 17, 2011 10:13 am
by dlabreu
So now everything is 100%??

Re: static DNS

Posted: Sat Sep 17, 2011 10:20 am
by ripken204
having issues again...

randomly some sites dont load and some give the error ERR_NAME_NOT_RESOLVED
these are popular sites too

then i flush my windows dns and it works again

another problem is that i have my wireless set to 5GHz-only-N and I am connected to it with 802.11n yet windows reports my speed at 54 Mbps
my wireless adapter is the R52Hn

Re: static DNS

Posted: Sat Sep 17, 2011 1:31 pm
by Caci99
You don't need to redirect traffic on port 80. That is http traffic.
If you want your static dns to work you need to redirect dns requests, and
enable on router to accept dns requests:
/ip firewall nat
add chain=dstnat action=redirect to-ports=53 protocol=udp 
     dst-address-type=!local dst-port=53
/ip dns print
 servers: x.x.x.x,y.y.y.y
  allow-remote-requests: yes
    max-udp-packet-size: xxx
             cache-size: xxxxKiB
          cache-max-ttl: 1d
             cache-used: xxxKiB

Re: static DNS

Posted: Sat Sep 17, 2011 5:04 pm
by ripken204
im not doing that anymore

but now i am having more serious problems.
woke up and no internet and i cant get it going again. plugged in my old router and it's working fine.
it's odd how it would work 7 hours ago and not now.


EDIT: plugged the mikrotik back in and it just worked... i dont get why its working now and not before, but at least it is working

Re: static DNS

Posted: Sun Sep 18, 2011 7:26 am
by ripken204
so my dns is working fine internally but it doesnt work at all externally.

i have a domain name website.com pointing to my home ip address
in the dns i have website.com pointing to 192.168.0.5 and that works fine
on an external computer they are seeing 192.168.0.1 (the mikrotik router config page)

in the DNS settings i did check Allow Remote Requests
what else is needed?

Re: static DNS

Posted: Sun Sep 18, 2011 7:37 am
by fewi
If external DNS is pointing to your public IP address for a web site you need to then port forward tcp/80 to the inside IP address of the web server. You just didn't have to do so for internal clients. External clients can't reach devices on your internal network that have private IP addresses without destination NAT.

Keep in mind that you can only port forward to ONE server. You cannot port forward based on the host name requested if all host names resolve to the same IP address. Destination NAT happens on the first packet of the connection, which is a TCP SYN - 3 packets before any HTTP request will be sent. If you need to overload one public IP address with multiple web sites hosted on different servers you need to deploy a proxy server on your network, and then redirect all HTTP traffic to the proxy which handles the distribution to the different servers.

Re: static DNS

Posted: Sun Sep 18, 2011 7:42 am
by ripken204
it's a bit disappointing that the router can't handle that but i can live with it, thanks

Re: static DNS

Posted: Sun Sep 18, 2011 7:50 am
by fewi
That's not a limitation of the router, that's a limitation of how TCP/IP works.

The router has a built in proxy, and there's a wiki article covering just this question: http://wiki.mikrotik.com/wiki/Multiple_Web_Servers

If you use the built in proxy be aware that it isn't built for large amounts of traffic. Depending on what router you have as well as how much traffic there's going to be it might not be able to handle it. You'd have to deploy a dedicated proxy in that case.

Re: static DNS

Posted: Sun Sep 18, 2011 7:53 am
by ripken204
its a RB493G and the traffic will be very small

i will give that a try, thanks