NOS-TUN(8)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

🌸 NAME 🌸

okay so welcome to nos-tun(8), bestie β€” this is the utility that implements a nos-style or ka9q-style IP over IP tunnel. it’s giving β€œpackets in a trench coat,” and we’re obsessed. 🫢


✨ SYNOPSIS ✨

nos-tun -t tunnel -s source -d destination -p protocol_number [source]
        target

πŸ’– DESCRIPTION πŸ’–

nos-tun is used to establish an nos style tunnel (also known as ka9q or IP-IP tunnel) using a tun(4) kernel interface. no cap, that’s the whole vibe. πŸ¦‹

the flags and args line up like this:

  • -t tunnel β€” this is the name of the tunnel device, like /dev/tun0 for example. πŸŽ€
  • -s source and -d destination β€” these are the addresses used on the tunnel device.
  • -p protocol_number β€” this sets tunnel mode. the original KA9Q NOS uses 94, but many people use 4 on the worldwide backbone of ampr.org. πŸ”₯

the synopsis also shows [source] before target, and target is the address of the remote tunnel device β€” it must match the source address set on the remote end. periodt. πŸ’…

if you configure the tunnel against a cisco router, use a netmask of 255.255.255.252 on the cisco. this is because the tunnel is a point-to-point interface in the FreeBSD end, and that’s a concept cisco does not really implement. not me explaining cisco lore, but here we are. 😭


🌈 EXAMPLES 🌈

this end, a FreeBSD box on address 192.168.59.34:

nos-tun -t /dev/tun0 -s 192.168.61.1 -d 192.168.61.2 192.168.56.45

remote cisco on address 192.168.56.45:

interface tunnel 0
ip address 192.168.61.2 255.255.255.252
tunnel mode nos
tunnel destination 192.168.59.34
tunnel source 192.168.56.45

πŸ¦‹ HISTORY πŸ¦‹

the nos-tun utility appeared in FreeBSD 3.0. iconic behavior, honestly. πŸ‘‘


πŸŽ€ AUTHORS πŸŽ€

  • Nickolay N. Dudorov <nnd@itfs.nsk.su> wrote the program. πŸ’–
  • Poul-Henning Kamp <phk@FreeBSD.org> wrote the man-page. ✨
  • Isao SEKI <iseki@gongon.com> added a new flag, IP protocol number. 🌸

πŸ’€ BUGS πŸ’€

we do not allow for setting our source address for multihomed machines. big sad, but that’s the rule. 🫠


πŸ’– cute sign-off: this page is from Debian, dated October 5, 2016, and yes bestie, it’s NOS-TUN(8). mwah! πŸŽ€βœ¨
πŸ“¦ where this page comes from