Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #184708 > unrolled thread

cannot get node dns program to work externally

Started byAaron Gray <aaronngray.lists@gmail.com>
First post2017-08-06 03:50 +0200
Last post2017-08-20 23:40 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.debian.user


Contents

  cannot get node dns program to work externally Aaron Gray <aaronngray.lists@gmail.com> - 2017-08-06 03:50 +0200
    Re: cannot get node dns program to work externally Lck Ras <likcoras@riseup.net> - 2017-08-06 04:40 +0200
    Re: [nodejs] Re: cannot get node dns program to work externally Aaron Gray <aaronngray.lists@gmail.com> - 2017-08-20 23:40 +0200

#184708 — cannot get node dns program to work externally

FromAaron Gray <aaronngray.lists@gmail.com>
Date2017-08-06 03:50 +0200
Subjectcannot get node dns program to work externally
Message-ID<ubiRA-4c2-5@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hi,

I have a node.js based dns program on port 53 and have it working as
localhost on debian 8.5 but I cannot seem to get it to work externally
despite getting the firewall rules right having tested them with Bind9.

-A INPUT -p udp --dport 53 --sport 1024:65535 -j ACCEPT
-A OUTPUT -p udp --sport 53 --dport 1024:65535 -j ACCEPT
-A OUTPUT -p udp --sport 53 --dport 1024:65535 -j ACCEPT
-A INPUT -p udp --dport 53 --sport 1024:65535 -j ACCEPT

-A OUTPUT -p udp --sport 53 --dport 53 -j ACCEPT
-A INPUT -p udp --dport 53 --sport 53 -j ACCEPT


Also I have done :-

    setcap cap_net_bind_service=+ep /usr/bin/nodejs

to allow node to work with ports less than 1024.

I have my node dns program working on port 53 UDP with dig from localhost
but Basically not externally on the local network and cannot work out why ?

I have mainly been using :-

    https://github.com/tjfontaine/node-dns/blob/master/examples/forwarder.js

for testing.

Its probably something obvious hope someone can help !

-- 
Aaron Gray

Independent Open Source Software Engineer, Computer Language Researcher,
Information Theorist, and amateur computer scientist.

[toc] | [next] | [standalone]


#184710

FromLck Ras <likcoras@riseup.net>
Date2017-08-06 04:40 +0200
Message-ID<ubjDX-4OU-3@gated-at.bofh.it>
In reply to#184708
On 08/06/2017 10:42 AM, Aaron Gray wrote:
> Hi,
> 
> I have a node.js based dns program on port 53 and have it working as
> localhost on debian 8.5 but I cannot seem to get it to work externally
> despite getting the firewall rules right having tested them with Bind9.

Check if it's listening on localhost. Make sure that the server is not
listening on 127.0.0.1 'ss -unl'. Otherwise, you need to do a bit of
forwarding magic, but listening on the proper interface is a cleaner
solution, I believe.

> I have mainly been using :-
> 
>     https://github.com/tjfontaine/node-dns/blob/master/examples/forwarder.js

>From what I can see from the code you linked, 127.0.0.1 is hardcoded.
Make sure you change that.

[toc] | [prev] | [next] | [standalone]


#185605 — Re: [nodejs] Re: cannot get node dns program to work externally

FromAaron Gray <aaronngray.lists@gmail.com>
Date2017-08-20 23:40 +0200
SubjectRe: [nodejs] Re: cannot get node dns program to work externally
Message-ID<ugG6R-3RF-3@gated-at.bofh.it>
In reply to#184708

[Multipart message — attachments visible in raw view] — view raw

Mikkel,

Cheers ! Knew it had to be sometyhing simple. Stange that port 80 works
with localhost 127.0.0.1 though ?

Aaron

On 10 August 2017 at 19:37, Mikkel Wilson <codebudo@gmail.com> wrote:

> I haven't run this locally to test, but you appear to be binding only to
> the localhost address: https://github.com/tjfontaine/node-dns/blob/
> master/examples/forwarder.js#L10
>
> This should exhibit the symptoms you mention and allow it to work on
> localhost and not on remote addresses. Change this from '127.0.0.1' to
> '0.0.0.0' to bind on all addresses and it should be available externally as
> well.
>
> Mikkel
>
>
> On Monday, August 7, 2017 at 2:56:11 PM UTC-7, AaronNGray wrote:
>>
>> Hi,
>>
>> I have a node.js based dns program on port 53 and have it working as
>> localhost on debian 8.5 but I cannot seem to get it to work externally
>> despite getting the firewall rules right having tested them with Bind9.
>>
>> -A INPUT -p udp --dport 53 --sport 1024:65535 -j ACCEPT
>> -A OUTPUT -p udp --sport 53 --dport 1024:65535 -j ACCEPT
>> -A OUTPUT -p udp --sport 53 --dport 1024:65535 -j ACCEPT
>> -A INPUT -p udp --dport 53 --sport 1024:65535 -j ACCEPT
>>
>> -A OUTPUT -p udp --sport 53 --dport 53 -j ACCEPT
>> -A INPUT -p udp --dport 53 --sport 53 -j ACCEPT
>>
>>
>> Also I have done :-
>>
>>     setcap cap_net_bind_service=+ep /usr/bin/nodejs
>>
>> to allow node to work with ports less than 1024.
>>
>> I have my node dns program working on port 53 UDP with dig from localhost
>> but Basically not externally on the local network and cannot work out why ?
>>
>> I have mainly been using :-
>>
>>     https://github.com/tjfontaine/node-dns/blob/master/examples/
>> forwarder.js
>>
>> for testing.
>>
>> Its probably something obvious hope someone can help !
>>
>> --
>> Aaron Gray
>>
>> Independent Open Source Software Engineer, Computer Language Researcher,
>> Information Theorist, and amateur computer scientist.
>>
> --
> Job board: http://jobs.nodejs.org/
> New group rules: https://gist.github.com/othiym23/9886289#file-
> moderation-policy-md
> Old group rules: https://github.com/joyent/node/wiki/Mailing-List-
> Posting-Guidelines
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+unsubscribe@googlegroups.com.
> To post to this group, send email to nodejs@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/nodejs/ec063c84-9f7f-4c53-a18d-921e25ebf9ba%40googlegroups.com
> <https://groups.google.com/d/msgid/nodejs/ec063c84-9f7f-4c53-a18d-921e25ebf9ba%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Aaron Gray

Independent Open Source Software Engineer, Computer Language Researcher,
Information Theorist, and amateur computer scientist.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web