summaryrefslogtreecommitdiffstats
path: root/content/posts/openbsd-vpn-gateway/index.org
diff options
context:
space:
mode:
authorDante Catalfamo2020-08-28 15:45:19 -0400
committerDante Catalfamo2020-08-28 15:45:19 -0400
commit9affebdd8db38915ce7f5b025bd6e7b4c096c532 (patch)
tree4c85a33da85e5252257c3f2f55ab5ef677332038 /content/posts/openbsd-vpn-gateway/index.org
parentc6df2f181ea7b48cee5b38d22b67e122eac5b44f (diff)
downloadblog-9affebdd8db38915ce7f5b025bd6e7b4c096c532.tar.gz
blog-9affebdd8db38915ce7f5b025bd6e7b4c096c532.tar.bz2
blog-9affebdd8db38915ce7f5b025bd6e7b4c096c532.zip
vpn-gateway: Add mygate configuration
Diffstat (limited to 'content/posts/openbsd-vpn-gateway/index.org')
-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.