On 2009-05-29, Scott McEachern <sc...@erratic.ca> wrote:
>
> So the specifics for OpenBSD is that this is completely do-able with 
> userland pppoe.  Keep the existing pppoe setup for the single IP as is, 
> and just modify the /etc/ppp/ppp.linkup file as such:  (Assuming you 
> were given a.b.c.d/30)
>
> MYADDR:
>  !bg sh -c "/sbin/ifconfig tun0 alias a.b.c.d netmask 255.255.255.255"
> [...]
>  !bg sh -c "/sbin/ifconfig tun0 alias a.b.c.d+3 netmask 255.255.255.255"
>  !bg sh -c "/sbin/pfctl -ef /etc/pf.conf"
>  !bg sh -c "pkill -1 named"

where you have a single address and also a routed subnet, the normal
way to do this is to put those IPs on another network interface.
but with something small like a /30, assuming you just want them for
natting and not passing directly to another machine, this is a good
way to make use of the extra addresses that you normally wouldn't
be able to.

>
>   The last two lines are to load a pppoe-aware pf.conf and to let the 
> name server start listening on any external address per named.conf.
>   The result is that adding a /30 actually gives a total of 5 usable 
> IPs: the original IP, what you would think are the 'network' and 
> 'broadcast' addresses for the /30, plus the two 'normal' usable addresses.
>   After that, it was just a matter of myself and pf.conf having a chat, 
> and all is well. :)

Reply via email to