Skip to content

A memo and script of DS-Lite(RFC6333) config with OpenBSD

License

Notifications You must be signed in to change notification settings

moonsightz/dslite-with-openbsd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DS-Lite config with OpenBSD

Japanese version

In Japan, DS-Lite(RFC6333) is used for IPv4 over IPv6. This is a memo of DS-Lite config with OpenBSD 7.4/7.5 router.

Reference

Notation

An interface on WAN is WAN0, an interface on LAN is LAN1. Please replace them with real names of interfaces like re0.

Files

Config

As far as I have checked, there is no ND proxy for OpenBSD (except lite-version nd-reflector https://mano.xyz/post/2021-10-31-openbsd-nd-proxy/). If you want to use IPv6 from client, IPv6-IPv6 NAT must be configured and net.inet6.ip6.forwarding=1 must be set in sysctl.conf.

WAN0 interface must be setup with inet6 autoconf temporary.

It is not necessary to change config of LAN1 interface (IPv4 router). If you need IPv6, configure IPv6 address and rad(8). MTU/MSS must be 1454/1414 if you want to use DS-Lite with PPPoE. If only DS-Lite, MTU 1460/MSS 1420.

MSS of tunnel interface must be set in pf.conf like match on gif0 scrub (random-id max-mss 1414). If you will use IPv6-IPv6 NAT, its configuration must be set in pf.conf.

Note that resolvd sets DNS server of PPPoE to resolv.conf from OpenBSD 7.1.

scripts/boot_config configures a tunnel interface. It must be executed on boot. rc.local is used to add local command execution at the end of boot sequence, but daemons started before rc.local, such as unbound, may warn that there is no connection to the Internet. To suppress this, the script must be executed just before these daemons by modifying /etc/rc.

IPv6 address configured with temporary is invalidated in some period. scripts/gwi_address.sh must be executed in appropriate period to use newly assigned IPv6 address.

FAQ

Q. Is it OK changing IPv6 address for tunnel when it is being used in connection?

A. I think active TCP connection will be disconnected (I have not experimented). It may be OK if it is executed at midnight (when not used)...

About

A memo and script of DS-Lite(RFC6333) config with OpenBSD

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages