From f2feeb604604078b30fac4aff6d76902e1f2189f Mon Sep 17 00:00:00 2001 From: Dante Catalfamo Date: Mon, 13 Jul 2020 23:43:30 -0400 Subject: gateway: Add header --- content/posts/openbsd-vpn-gateway/index.org | 41 +++++++++++++++-------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/content/posts/openbsd-vpn-gateway/index.org b/content/posts/openbsd-vpn-gateway/index.org index 4d363b1..d1e5db3 100644 --- a/content/posts/openbsd-vpn-gateway/index.org +++ b/content/posts/openbsd-vpn-gateway/index.org @@ -61,28 +61,29 @@ In this post the machine will have a single network interface called =vio0= with a desired static IP of =192.168.0.11=, although the interface and IP in your case will be different. -The most important thing is to set a static IP, so it can be set as -the gateway for client machines. We'll set this first. +* Configuring a static IP + The most important thing is to set a static IP, so it can be set as + the gateway for client machines. We'll set this first. -Setting a static IP in OpenBSD couldn't be simpler. For each interface -on the machine, you can create a file with the name -=/etc/hostname.=, where == is the name of the interface. Since -we want to set a configure the interface =vio0=, the file we want is -=/etc/hostname.vio0=. If your box was configured with DHCP, the file -might contain =dhcp=. We want to give the interface the static IP -=192.168.0.11=, so we open the file and replace its contents with the -following. + Setting a static IP in OpenBSD couldn't be simpler. For each interface + on the machine, you can create a file with the name + =/etc/hostname.=, where == is the name of the interface. Since + we want to set a configure the interface =vio0=, the file we want is + =/etc/hostname.vio0=. If your box was configured with DHCP, the file + might contain =dhcp=. We want to give the interface the static IP + =192.168.0.11=, so we open the file and replace its contents with the + following. -#+BEGIN_SRC -inet 192.168.0.11/24 -#+END_SRC + #+BEGIN_SRC + inet 192.168.0.11/24 + #+END_SRC -Now we run [[https://man.openbsd.org/man8/netstart.8][=netstart(8)=]] to reconfigure the interface according to the -file we've just edited. + Now we run [[https://man.openbsd.org/man8/netstart.8][=netstart(8)=]] to reconfigure the interface according to the + file we've just edited. -#+BEGIN_SRC shell -dosa sh /etc/netstat vio0 -#+END_SRC + #+BEGIN_SRC shell + dosa sh /etc/netstat vio0 + #+END_SRC -Now if you check =ifconfig=, you should see the interface has the -correct IP. + Now if you check =ifconfig=, you should see the interface has the + correct IP. -- cgit v1.2.3