Trying out WireGuard's kernel support in OpenBSD's -current snapshots

栏目: IT技术 · 发布时间: 4年前

Jason A. Donenfeld Jason at zx2c4.com

Wed Jun 24 08:07:22 CEST 2020
Hi everyone,

With WireGuard now being enabled on OpenBSD's -current snapshot builds,
it's pretty easy to try it out on the platform. This email describes two
options for doing in the context of basic VPS providers or personal
machines.

Method A) From an existing OpenBSD install

If you already have an OpenBSD install -- perhaps your VPS provider
supports it as an auto install -- things are pretty easy:

1. Use sysupgrade(8) to upgrade to the latest snapshot as root:

    # sysupgrade -s

2. After it installs and it reboots, install wg(8) and wg-quick(8) as
   root:

    # pkg_add wireguard-tools

3. Now you can use wg(8) and wg-quick(8), in addition to ifconfig(8).


Method B) From an existing Linux install

You probably already have a Linux install -- or most likely your VPS
provider will have any number of Linux distros out of the box -- in
which case you can easily overwrite that Linux install with an OpenBSD
install.

1. Download the miniroot installer:

    $ curl -OJL <a href="https://cdn.openbsd.org/pub/OpenBSD/snapshots/amd64/miniroot67.img">https://cdn.openbsd.org/pub/OpenBSD/snapshots/amd64/miniroot67.img</a>

2. Write the installer to your hard drive, which is usually either vda,
   sda, hda, or nvme0n1. One of these commands will work, and the other
   three will fail:

    $ sudo dd if=miniroot67.img of=/dev/vda
    $ sudo dd if=miniroot67.img of=/dev/sda
    $ sudo dd if=miniroot67.img of=/dev/hda
    $ sudo dd if=miniroot67.img of=/dev/nvme0n1

   After one of those succeeds, this step is complete.

3. Reboot the machine, and connect to its serial port. Most VPS
   providers have an option called "launch console" or similar. You'll see
   the OpenBSD installer. Most of the defaults should suit you fine, and
   there are any number of online manuals on installing OpenBSD.

4. When the installed system boots, install wg(8) and wg-quick(8) as
   root:

    # pkg_add wireguard-tools

5. Now you can use wg(8) and wg-quick(8), in addition to ifconfig(8).


Sidenote) Updating wireguard-go scripts to use the new wg(4) kernel
          driver

If you've already been using WireGuard with OpenBSD, it's via
wireguard-go.  The big recent news is that a new native WireGuard
implementation, wg(4), is now baked into the OpenBSD kernel, and
userland utilities like ifconfig(8) and tcpdump(8) support it too. From
a tooling perspective, however, very little should change: recent
versions of wg(8) and wg-quick(8) support WireGuard using the exact same
semantics as before, with these two exceptions:

1. Instead of running `wireguard-go tun0` to create a tunnel manually,
   you now run `ifconfig wg0 create`.

2. Instead of referring to the WireGuard interface as "tunX", it's now
   "wgX".

Other than those two things, all scripts and commands should behave
identically.


Please let us know if you run into any bugs or other headaches. Thanks
in advance for your testing and feedback.

Enjoy!
Jason
More information about the WireGuard mailing list

以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

决战大数据

决战大数据

车品觉 / 浙江人民出版社 / 2014-3-1 / 45.9

[内容简介]  大数据时代的来临,给当今的商业带来了极大的冲击,多数电商人无不“谈大数据色变”,并呈现出一种观望、迷茫、手足无措的状态。车品觉,作为一名经验丰富的电商人,在敬畏大数据的同时,洞悉到了数据时代商业发展的更多契机,他创新了数据框架的建立和使用,重新量化了数据价值的指标,并挖掘了在无线数据和多屏时代下商业发展的本质……在他看来,改变思维方式,即可改变数据和商业的未来。  ......一起来看看 《决战大数据》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

在线进制转换器
在线进制转换器

各进制数互转换器

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换