Configuring Bind

Configuring Bind

Postby laidlaws » Aug 27th, '16, 16:17

I am playing with OSGrid, and trying to get my computer to talk to itself via loopback. I have a NetComm router. From the OSGrid Wiki:

Connecting to your locally hosted server from behind a DSL router using NAT

Loopback Most DSL routers/modems prevent loopback connections as a security feature. This means that a NATed IP address ( such as 192.168.2.40 ) can not connect to your forward facing IP address ( such as 199.149.252.44 ) from behind your DSL router/modem. In a case like this, external IP addresses may connect to your server/region but you can not ( this applies to both standalone and grid modes ).

DNS solution(Linux) It's possible to host your own DNS-server, so you can prevent some of the dns-naming problems mentioned before. If http://example.org resolves to the external ip, and that loopback connection is prevented by your router, you could point your resolv.conf to a local nameserver like:

Code: Select all
nameserver 192.168.2.2


Now you need bind/named installed in order to handle the dns-requests. You can find a bind example configfile here.
(It isn't even a link :evil: )

At present I have installed bind with the default parameters. Is there a guide on what to do next? I assume that a caching nameserver is needed. The intention is to make the loopback happen locally, not in the router.
laidlaws
 
Posts: 233
Joined: May 24th, '11, 04:58

Re: Configuring Bind

Postby doktor5000 » Aug 27th, '16, 23:04

If you only want to resolve several hostnames, why not just add them to /etc/hosts and make sure that /etc/nsswitch.conf uses files first for hosts name resolution ?

Regarding named/bind setup, check e.g. https://wiki.mageia.org/en/Virtual_Mach ... t.2FVM_LAN for a few pointers ...
Or lookup a generic bind / named howto e.g https://wiki.archlinux.org/index.php/BIND or take a look at dnsmasq: https://wiki.archlinux.org/index.php/dnsmasq
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Configuring Bind

Postby laidlaws » Aug 28th, '16, 00:52

Thanks Doktor. I want it as simple as possible, and I don't really need the extra speed from a local nameserver. I looked at a Ubuntu post, but Archlinux is very good for command-line stuff.

The problem arises when I put up the sim from my box then try to view it from a viewer on the same box. The IP address would be the same. I was thinking of logging in from my wife's laptop on the same network. That wouldn't be a loopback.
laidlaws
 
Posts: 233
Joined: May 24th, '11, 04:58


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest

cron