Community discussions

MikroTik App
 
ripken204
just joined
Topic Author
Posts: 10
Joined: Tue Sep 13, 2011 3:12 am

static DNS

Sat Sep 17, 2011 9:41 am

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?
 
User avatar
dlabreu
Frequent Visitor
Frequent Visitor
Posts: 60
Joined: Fri May 08, 2009 10:14 am
Location: South Africa

static DNS

Sat Sep 17, 2011 9:54 am

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
 
ripken204
just joined
Topic Author
Posts: 10
Joined: Tue Sep 13, 2011 3:12 am

Re: static DNS

Sat Sep 17, 2011 9:57 am

i actually had to flush my DNS in windows, then it worked just fine
 
User avatar
dlabreu
Frequent Visitor
Frequent Visitor
Posts: 60
Joined: Fri May 08, 2009 10:14 am
Location: South Africa

static DNS

Sat Sep 17, 2011 10:13 am

So now everything is 100%??
 
ripken204
just joined
Topic Author
Posts: 10
Joined: Tue Sep 13, 2011 3:12 am

Re: static DNS

Sat Sep 17, 2011 10:20 am

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
 
User avatar
Caci99
Forum Guru
Forum Guru
Posts: 1076
Joined: Wed Feb 21, 2007 2:26 pm
Location: Tirane
Contact:

Re: static DNS

Sat Sep 17, 2011 1:31 pm

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
 
ripken204
just joined
Topic Author
Posts: 10
Joined: Tue Sep 13, 2011 3:12 am

Re: static DNS

Sat Sep 17, 2011 5:04 pm

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
 
ripken204
just joined
Topic Author
Posts: 10
Joined: Tue Sep 13, 2011 3:12 am

Re: static DNS

Sun Sep 18, 2011 7:26 am

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?
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: static DNS

Sun Sep 18, 2011 7:37 am

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.
 
ripken204
just joined
Topic Author
Posts: 10
Joined: Tue Sep 13, 2011 3:12 am

Re: static DNS

Sun Sep 18, 2011 7:42 am

it's a bit disappointing that the router can't handle that but i can live with it, thanks
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: static DNS

Sun Sep 18, 2011 7:50 am

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.
 
ripken204
just joined
Topic Author
Posts: 10
Joined: Tue Sep 13, 2011 3:12 am

Re: static DNS

Sun Sep 18, 2011 7:53 am

its a RB493G and the traffic will be very small

i will give that a try, thanks