Bug 243062

Summary: man ppp: mention default ppp_nat="YES" for rc.conf
Product: Documentation Reporter: Evilham <contact>
Component: Manual PagesAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Some People CC: allanjude, doc
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=44443

Description Evilham 2020-01-03 18:27:42 UTC
I just lost some time over this and didn't think of checking rc defaults or rc.conf, except when someone mentioned it on IRC.

There was a related bug for the handbook:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=44443

Having that patch in the handbook would have also saved me the surprise, as man ppp basically suggests that the NAT functionality is disabled by default, but starting ppp with rc.conf contradicts that.

I would think mentioning this behaviour with a hint to man rc.conf would be enough, this can be done under:

NETWORK ADDRESS TRANSLATION (PACKET ALIASING)

But would also be useful on the second paragraph of the description, where the -nat flag is introduced.

I am willing to propose a patch for this and to re-open 44443 and propose a patch for it too if this approach were acceptable.

FTR, this is what I was working on when I discovered this issue and would re-use bits of it as real-life examples of using ppp(oe) on FreeBSD.

https://evilham.com/en/blog/2019-FreeBSD-eXO-router/#pppoe
https://evilham.com/en/blog/2020-FreeBSD-home-router-legacy-ipv4/#local-legacy-ipv4-networking-nat-implementing
(as of this bug report these are quite advanced drafts but require more editing)
Comment 1 Evilham 2020-07-11 16:47:13 UTC
Learning by doing at the virtual bug squash: https://reviews.freebsd.org/D25621
Comment 2 commit-hook freebsd_committer freebsd_triage 2020-07-11 16:58:34 UTC
A commit references this bug:

Author: allanjude
Date: Sat Jul 11 16:57:45 UTC 2020
New revision: 363100
URL: https://svnweb.freebsd.org/changeset/base/363100

Log:
  defaults/rc.conf: note that the default is ppp_nat="YES"

  PR:		243062
  Submitted by:	Evilham <contact@evilham.com>
  MFC after:	2 weeks
  Sponsored by:	Klara Inc.
  Differential Revision:	https://reviews.freebsd.org/D25621

Changes:
  head/share/man/man5/rc.conf.5
Comment 3 commit-hook freebsd_committer freebsd_triage 2020-07-11 18:25:09 UTC
A commit references this bug:

Author: allanjude
Date: Sat Jul 11 18:24:17 UTC 2020
New revision: 363105
URL: https://svnweb.freebsd.org/changeset/base/363105

Log:
  ppp: Document the fact that ppp_nat is enabled by default

  No functional change.

  PR:		243062
  Submitted by:	Evilham <contact@evilham.com> (original version)
  MFC after:	2 weeks
  Sponsored by:	Klara Inc.
  Event:		July 2020 Bugathon
  Differential Revision:	https://reviews.freebsd.org/D25623

Changes:
  head/usr.sbin/ppp/ppp.8