Answer the question
In order to leave comments, you need to log in
How to give access to local network resources behind dns?
Good day to all.
Available: external ip address 111.222.333.444, and example.com domain purchased.
Behind it are several computers that act as servers. They, in turn, spin virtual machines, a file server, a 1c server, a database server and a web server. At the moment, all addressing comes down to forwarding to the corresponding internal Ip, depending on the port through which they are trying to connect, i.e.:
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 3389 -i eth0 -j DNAT --to 192.168.10.51:3389 #переадресация на
iptables -A FORWARD -m tcp -p tcp -d 192.168.10.51 --dport 3389 -j ACCEPT # rdp
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -i eth0 -j DNAT --to 192.168.10.55:80 #переадресация на
iptables -A FORWARD -m tcp -p tcp -d 192.168.10.55 --dport 80 -j ACCEPT # web сервер
... И Т.Д.
Answer the question
In order to leave comments, you need to log in
That's right, in the exaple.com domain zone, you need to register an A record for promo, or * leading to 111.222.333.444 (by the way, there can't be such an ip, only 255 bytes :))
These rules are currently written:
==================/etc/bind/named.conf.local==========
//
// Do any local configuration here
//
zone "example.com"{
type master;
file "/etc/bind/example.com.hosts";
};
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "10.168.192.in-addr.arpa" {
type master;
file "/etc/bind/192.168.10.in-addr.arpa";
};
$TTL 38400
@ IN SOA ns.example.com. example.com (
1192648703
10800
3600
604800
38400 )
;
@ IN NS localhost.
ns IN NS 192.168.10.1
gate IN A 192.168.10.1
storage IN A 192.168.10.6
promo1 IN A 192.168.10.55
$TTL 3600
@ IN SOA gate.example.com. example.com (
20060204 ; Serial
3600 ; Refresh
900 ; Retry
3600000 ; Expire
3600 ) ; Minimum
@ IN NS localhost.
1 IN NS ns.
6 IN PTR storage.
55 IN PTR promo1.
~
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question