FreeBSD-11 : What TCP/UDP ports does pkg update use?

James B. Byrne byrnejb at harte-lyne.ca
Mon Dec 12 15:50:17 UTC 2016


On Mon Dec 12 15:01:39 UTC 2016 Matthew Seaman matthew at FreeBSD.org
wrote:

On 2016/12/12 14:26, James B. Byrne via freebsd-questions wrote:
>> Experimenting with PF I discover that the pkg utility is being
>> blocked.  However, I cannot seem to find any documentation on what
>> port(s) pkg is trying to use.  Can someone provide me with a
>> reference, please?
>>
> pkg will communicate with a repository over a network using one
> or more of a number of different protocols, depending on how it
> is configured.
. . .
> If the URL scheme is 'pkg+something' that indicates a
> SRV-style lookup, which can override the normal port numbers,
> as can an explicitly given port in a
> http://example.com:8080/ style URL.
>
> However, if you're using the default /etc/pkg/FreeBSD.conf,
> then the communication protocol is HTTP over port 80.

pkg -vv
. . .
Repositories:
  FreeBSD: {
    url             :
"pkg+http://pkg.FreeBSD.org/FreeBSD:11:amd64/quarterly",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }

So I switched this to:
'"pkg+https://pkg.FreeBSD.org/${ABI}/quarterly"', but the FreeBSD.conf
file says not to modify it in any way.  Do I just copy the modified
file to '/usr/local/etc/pkg/repos/FreeBSD.conf' instead?  The example
in the file talks about disabling the FreeBSD repo which is not what I
want to do.

The man pages do not really discuss what to do if one simply wishes to
change the default protocol.  The authors likely thought the issue was
self-explanatory. But the obvious course of action seems to be
precluded by the warning contained inside the file itself.

-- 
***          e-Mail is NOT a SECURE channel          ***
        Do NOT transmit sensitive data via e-Mail
 Do NOT open attachments nor follow links sent by e-Mail

James B. Byrne                mailto:ByrneJB at Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3



More information about the freebsd-questions mailing list