0

I am attempting to configure a vpn on my machine without a router or home network (wireles connection). Is it possible to solely utilize one device and configure two peers (client/server) then route all network traffic through that tunnel?

I have attempted many different configurations but below is the most recent. I have not been able to get any traffic through either network and am curious if this is possible without a physical router, multiple devices or subscription to a vpn provider?

I'm quite new to this so pardon my ignorance if there are obvious/fundamental principles I may be missing. Any guidance/pointers would be much appreciated.

net1
[Interface]
Address = 10.0.0.1/24
ListenPort = 51820
PrivateKey = 
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o wlp3s0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o wlp3s0 -j MASQUERADE

[Peer]
PublicKey = 
AllowedIPs = 10.0.0.2/32

net2
[Interface]
Address = 10.0.0.2/32
PrivateKey = 
DNS = 10.0.0.1

[Peer]
PublicKey = 
Endpoint = :51000
AllowedIPs = 0.0.0.0/0, ::/0

0 Answers0