Community discussions

MikroTik App
 
pomah
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 61
Joined: Fri Aug 15, 2014 5:00 pm

Hairpin NAT and DNS

Thu Sep 25, 2014 12:06 pm

Hi guys I'm using the follwoing dns script to update my IP:

/tool fetch address="freedns.afraid.org" host="freedns.afraid.org" mode=http src-path="dynamic/update.php\?mycode" keep-result=no

This works great, now I would like to setup hairpin NAT on my network, so that I can use the DNS inside and outside of my network, how do I move forward?

I can also add that I have moved my wan IP server to a new bridge, called bridgewan, so that ethernet1 and ethernet5 is bridge to my ISP directly.

Any ideas?
 
Rudios
Forum Veteran
Forum Veteran
Posts: 973
Joined: Mon Mar 11, 2013 12:58 pm
Location: The Netherlands

Re: Hairpin NAT and DNS

Thu Sep 25, 2014 12:47 pm

Hi guys I'm using the follwoing dns script to update my IP:

/tool fetch address="freedns.afraid.org" host="freedns.afraid.org" mode=http src-path="dynamic/update.php\?mycode" keep-result=no

This works great, now I would like to setup hairpin NAT on my network, so that I can use the DNS inside and outside of my network, how do I move forward?

I can also add that I have moved my wan IP server to a new bridge, called bridgewan, so that ethernet1 and ethernet5 is bridge to my ISP directly.

Any ideas?
Create a NAT rule that looks like
/ip firewall nat
add chain=srcnat action=masquerade src-address=<your local lan> dst-address=<internal address of forwarded device> out-interface=<local bridge>
 
pomah
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 61
Joined: Fri Aug 15, 2014 5:00 pm

Re: Hairpin NAT and DNS

Fri Sep 26, 2014 9:03 am

This does nothing for me...

How can I debug this?
Hi guys I'm using the follwoing dns script to update my IP:

/tool fetch address="freedns.afraid.org" host="freedns.afraid.org" mode=http src-path="dynamic/update.php\?mycode" keep-result=no

This works great, now I would like to setup hairpin NAT on my network, so that I can use the DNS inside and outside of my network, how do I move forward?

I can also add that I have moved my wan IP server to a new bridge, called bridgewan, so that ethernet1 and ethernet5 is bridge to my ISP directly.

Any ideas?
Create a NAT rule that looks like
/ip firewall nat
add chain=srcnat action=masquerade src-address=<your local lan> dst-address=<internal address of forwarded device> out-interface=<local bridge>
 
Rudios
Forum Veteran
Forum Veteran
Posts: 973
Joined: Mon Mar 11, 2013 12:58 pm
Location: The Netherlands

Re: Hairpin NAT and DNS

Mon Sep 29, 2014 3:48 pm

This does nothing for me...

How can I debug this?
Hi guys I'm using the follwoing dns script to update my IP:

/tool fetch address="freedns.afraid.org" host="freedns.afraid.org" mode=http src-path="dynamic/update.php\?mycode" keep-result=no

This works great, now I would like to setup hairpin NAT on my network, so that I can use the DNS inside and outside of my network, how do I move forward?

I can also add that I have moved my wan IP server to a new bridge, called bridgewan, so that ethernet1 and ethernet5 is bridge to my ISP directly.

Any ideas?
Create a NAT rule that looks like
/ip firewall nat
add chain=srcnat action=masquerade src-address=<your local lan> dst-address=<internal address of forwarded device> out-interface=<local bridge>
Can you please share your firewall filter and NAT rules with us.
Also give a brief overview of your devices involved.
 
pomah
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 61
Joined: Fri Aug 15, 2014 5:00 pm

Re: Hairpin NAT and DNS

Fri Mar 13, 2015 11:53 pm

Hi could you be of help to explain to me how "print" those for me to share with you all?

As for devices in my network I have 2 laptops, 2 cellphones, 1 server, 1 htpc, 1 tv box.

I have a dns setup so that I can allways reach my server, but everytime I get home I need to use the interal IP, everytime I'm out I need to use the external IP, I would like to make sure that I can allways use the external one with the help of Hairpin NAT, but I cant get that to work properly.

Thanks for helping out.

Who is online

Users browsing this forum: Amazon [Bot], Bing [Bot], neitro, voytecky and 49 guests