Hello
I have two public IP addresses. For just the one of them (111.222.333.444) I registered the domain
http://somedomain.org. In the settings of servers dns provider I pointed my public IP address (111.222.333.444).
I started the DNS and Web on one of the computers on the local network with the address 192.168.0.195. The DNS server running the Web as well. DNS translates names into IP addresses and vice versa.
Code:
# nslookup google.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
Name: google.com
Address: 216.58.209.174
Code:
# nslookup 216.58.209.174
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
174.209.58.216.in-addr.arpa name = bud02s21-in-f14.1e100.net.
174.209.58.216.in-addr.arpa name = bud02s21-in-f174.1e100.net.
Authoritative answers can be found from:
209.58.216.in-addr.arpa nameserver = ns3.google.com.
209.58.216.in-addr.arpa nameserver = ns2.google.com.
209.58.216.in-addr.arpa nameserver = ns1.google.com.
209.58.216.in-addr.arpa nameserver = ns4.google.com.
ns2.google.com internet address = 216.239.34.10
ns4.google.com internet address = 216.239.38.10
ns1.google.com internet address = 216.239.32.10
ns3.google.com internet address = 216.239.36.10
Code:
# ping google.com
PING google.com (216.58.209.174) 56(84) bytes of data.
64 bytes from bud02s21-in-f174.1e100.net (216.58.209.174): icmp_seq=1 ttl=58 time=27.3 ms
64 bytes from bud02s21-in-f174.1e100.net (216.58.209.174): icmp_seq=2 ttl=58 time=27.2 ms
^C
--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1341ms
rtt min/avg/max/mdev = 27.254/27.316/27.378/0.062 ms
Code:
# host google.com
google.com has address 216.58.209.174
google.com has IPv6 address 2a00:1450:400d:802::200e
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
In my router (Linux) in the firewall did redirecting 111.222.333.444 IP address 192.168.0.195.
Code:
G_NET_IP1=111.222.333.444
L_S1_IP=192.168.0.195
iptables -t nat -A PREROUTING -d $G_NET_IP1 -j DNAT --to-destination $L_S1_IP
iptables -t nat -A POSTROUTING -s $L_S1_IP -j SNAT --to-source $G_NET_IP1
And here begins my problem ... internet on the web is seen but only after entering the IP address or
http://111.222.333.444. When I type the address
http://somedomain.org I have a message that the page does not exist.
It seems to me that I have kicked off a redirect in my firewall but I can not deal with it. Do any of you could point out where I made a mistake?
Regards
orrik