Did you use the script from angristan to install it?
Then there’s probably that /etc/wireguard/wg0.conf on the server (not your cliënt)!
Then you see some of these rules already in there, but I sorted them out.
The contents I posted, should be between:
[Interface]
Address = 10.66.66.1/24,fd42:42:42::1/64
ListenPort = 59435
PrivateKey = [TheKey]
And
# The STORJ-client
[Peer]
PublicKey = [PublicKey]
PresharedKey = [PSK]
AllowedIPs = 10.66.66.2/32,fd42:42:42::2/128
So my full config looks like:
[Interface]
Address = 10.66.66.1/24,fd42:42:42::1/64
ListenPort = 59435
PrivateKey = [~TheKey~]
# Input from outside, mind the ingress-rule from Oracle-cloud!
# In my case the Wireguard-port is 59435
PostUp = iptables -I INPUT -p udp --dport 59435 -j ACCEPT
PostDown = iptables -D INPUT -p udp --dport 59435 -j ACCEPT
# Forwarding bidirectional, %i is substituted for the name of the wireguard-adapter
PostUp = iptables -I FORWARD -o %i -j ACCEPT
PostUp = iptables -I FORWARD -i %i -j ACCEPT
PostUp = ip6tables -I FORWARD -i %i -j ACCEPT
PostDown = iptables -D FORWARD -o %i -j ACCEPT
PostDown = iptables -D FORWARD -i %i -j ACCEPT
PostDown = ip6tables -D FORWARD -i %i -j ACCEPT
# In my case the ethernet adapter is enp0s6, change according to your situation
PostUp = iptables -t nat -A POSTROUTING -o enp0s6 -j MASQUERADE
PostUp = ip6tables -t nat -A POSTROUTING -o enp0s6 -j MASQUERADE
PostDown = iptables -t nat -D POSTROUTING -o enp0s6 -j MASQUERADE
PostDown = ip6tables -t nat -D POSTROUTING -o enp0s6 -j MASQUERADE
# STORJ, in my case it's the client with IP 10.66.66.2.
PostUp = iptables -I INPUT -p udp --dport 28967 -j ACCEPT
PostUp = iptables -I INPUT -p tcp --dport 28967 -j ACCEPT
PostUp = iptables -t nat -A PREROUTING -p udp --dport 28967 -j DNAT --to-destination 10.66.66.2
PostUp = iptables -t nat -A PREROUTING -p tcp --dport 28967 -j DNAT --to-destination 10.66.66.2
PostDown = iptables -D INPUT -p udp --dport 28967 -j ACCEPT
PostDown = iptables -D INPUT -p tcp --dport 28967 -j ACCEPT
PostDown = iptables -t nat -D PREROUTING -p udp --dport 28967 -j DNAT --to-destination 10.66.66.2
PostDown = iptables -t nat -D PREROUTING -p tcp --dport 28967 -j DNAT --to-destination 10.66.66.2
# The STORJ-client
[Peer]
PublicKey = [~PublicKey~]
PresharedKey = [~PSK~]
AllowedIPs = 10.66.66.2/32,fd42:42:42::2/128
Meaning that everything like [~var~] is a variable.