Binding to ports outside the range of 3000-4999

16 views
Skip to first unread message

Aaron wilson

unread,
Feb 1, 2016, 12:03:56 PM2/1/16
to Native-Client-Discuss
Hey guys. I have a quick question regarding the NACL UDP / TCP ports in the Pepper API. I have written some code to communicate with a local DHCP server to obtain info like the local domain name, the IP addresses of the local DNS servers etc. DHCP works by responding to your messages on port 68 however when I try to bind on port 68 in preparation for my response from the local DHCP server I am getting the error code PP_ERROR_NOACCESS. The documentation specifies that this will be returned if the port specified is not equal to 1000 or in the range 3000-4999.

To quote the documentation this error code means "failure due to insufficient privileges.". So my question is this. Is there a way for me to obtain permission to have a more flexible port range to work with? Or is this a fixed security reasoned implementation?

Thanks, Aaron.

Sam Clegg

unread,
Feb 1, 2016, 7:00:01 PM2/1/16
to native-cli...@googlegroups.com
Hi Aaron,

I'm not sure what documentation you are referring too, but you can't
bind to any ports < 1024. This is a restriction of the OS rather
than chrome or ppapi. See:
http://serverfault.com/questions/268099/bind-to-ports-less-than-1024-without-root-access

cheers,
sam
> --
> You received this message because you are subscribed to the Google Groups
> "Native-Client-Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to native-client-di...@googlegroups.com.
> To post to this group, send email to native-cli...@googlegroups.com.
> Visit this group at https://groups.google.com/group/native-client-discuss.
> For more options, visit https://groups.google.com/d/optout.

Aaron wilson

unread,
Feb 2, 2016, 4:17:21 AM2/2/16
to Native-Client-Discuss
Hi Sam, thanks for the reply.

It looks like I miss-interpreted some documentation regarding that error message. Looking back through the docs they mention network traffic being restricted as described for websockets, but not TCP and UDP sockets.

It seems I am going to be unable to achieve what I wanted, but at least now I know for sure! So thanks for your help clearing that up!

Regard, Aaron.
Reply all
Reply to author
Forward
0 new messages