| Summary: | [ipfilter] [ppp] Interactive use of user PPP and ipfilter can be insecure | ||
|---|---|---|---|
| Product: | Base System | Reporter: | jsnader <jsnader> |
| Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed Not A Bug | ||
| Severity: | Affects Only Me | CC: | cy, lwhsu |
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
jsnader
2001-05-20 20:40:01 UTC
> >Fix:
> Either manually reload the rules after starting PPP for the first time
> or put the reload in /etc/ppp/ppp.linkup *and* start PPP as root. This
> means you should probably remove ``allow user'' from ppp.conf.
>
> It is only necessary to reload the rules once after PPP has run. They
> will then be active on subsequent runs (until a reboot, of course).
The fix I use is to edit rc.network so the entire "start user PPP"
section is between the "Set host name if not already set" and "establish
ipf ruleset" sections. After doing that everything works fine, no
manual reloads required.
> >Number: 27474 > >Category: kern > >Synopsis: Interactive use of user PPP and ipfilter can be insecure I think that users of ppp with any sort of ipf or ipfw stuff should be very careful if they're not running with a ``-unit N'' command line as the only way to get things right is to install the rules from either ppp.conf or ppp.linkup using the INTERFACE macro (which of course requires root invocation as ppp invokes commands as the real user for security reasons). For people running ``ppp -unit 100 ...'' (for example), the best way to get things to work is to ensure that the interface is made available before ipf/ipfw are run with something like kldload tun touch /dev/tun100 This can probably be done from /etc/start_if.tun100 after adding tun100 to the $network_interfaces variable in rc.conf - but I'm not 100% sure the startup ordering will let this work. The alternative with ipfw (given that everyone side-steps /etc/rc.firewall) is to just invoke these commands at the start of your ipfw load script. I don't know about ipf (I've never used it). Of course I'll never really understand why users of ppp(8) don't just use the -nat option or the ``set filter'' commands and do away with ipf/ipfw.... I guess ipfw gives more flexibility, but I'm not sure that ipf has anything that libalias doesn't. -- Brian <brian@Awfulhak.org> <brian@[uk.]FreeBSD.org> <http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org> Don't _EVER_ lose your sense of humour ! Fixing this requires callbacks from attach/detach in sys/net/if.c Using ifnet_departure_event and ifnet_arrival_event would be the key here. Responsible Changed From-To: freebsd-net->cy Mine. For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped The user must issue ipf -y, either manually or in their PPP script, following the creation of new tunnel NICs. (I do this in my ssh and IPsec tunnel scripts.) |