summaryrefslogtreecommitdiffstats
path: root/content/posts/openbsd-vpn-gateway
diff options
context:
space:
mode:
Diffstat (limited to 'content/posts/openbsd-vpn-gateway')
-rw-r--r--content/posts/openbsd-vpn-gateway/index.org26
1 files changed, 18 insertions, 8 deletions
diff --git a/content/posts/openbsd-vpn-gateway/index.org b/content/posts/openbsd-vpn-gateway/index.org
index 0d4496e..216eb65 100644
--- a/content/posts/openbsd-vpn-gateway/index.org
+++ b/content/posts/openbsd-vpn-gateway/index.org
@@ -38,7 +38,8 @@
In this post the machine will have a single network interface called
=vio0=. We'll set it up with a static IP of =192.168.0.11= and a
- =/24= subnet. The interface and IP in your case will differ.
+ =/24= subnet. Our network's router is located at =192.168.0.1=. The
+ interface and IPs in your case will differ.
* Hardware
@@ -82,18 +83,27 @@
interface on the machine, you can create a [[http://man.openbsd.org/man5/hostname.if.5][=hostname.if(5)=]] file
with the name =/etc/hostname.<if>=, where =<if>= 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 a single line saying =dhcp=. We
- want to give the interface the static IP =192.168.0.11= with a =/24=
- subnet. We use [[https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing][CIDR notation]] here for convenience, but it's also
- possible to write out the full subnet mask after our IP, separated
- by a space. We open the file and replace its contents with the
- following.
+ the file we want is =/etc/hostname.vio0=.
+
+ If your box was configured with DHCP, the file might contain a
+ single line saying =dhcp=. We want to give the interface the static
+ IP =192.168.0.11= with a =/24= subnet. We use [[https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing][CIDR notation]] here for
+ convenience, but it's also possible to write out the full subnet
+ mask after our IP, separated by a space. We open the file and
+ replace its contents with the following.
#+BEGIN_SRC
inet 192.168.0.11/24
#+END_SRC
+ We'll also need to enter the IP of our network's router into the
+ [[https://man.openbsd.org/man5/myname.5][=mygate(5)=]] file at =/etc/mygate=.
+
+ #+BEGIN_SRC
+ 192.168.0.1
+ #+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.