DNAT for local network


#1

Hello everyone,

My configuration:
10.1.0.0/24 - Local network [eth0.777]
10.1.0.118 - DNS server
87.x.x.x - Public IP [eth1]

I have configured destination nat for my DNS like below:
rule 102 {
description DNS
destination {
address 87.x.x.x
port 53
}
inbound-interface eth0.777
protocol tcp_udp
translation {
address 10.1.0.118
}
}

Everything is working properly, but only from public network. I cannot access my DNS server (via public IP) from Local Network. Changing inbound-interface from eth0.777 to any not working :frowning:


#2

Inbound-interface should be eth1.
And to access from the local network on the public IP you need hairpin NAT.
https://wiki.vyos.net/wiki/User_Guide - look under NAT Reflection.


#3

Thank you so much. Works flawlessly :slight_smile:


closed #4

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.