From: Pranesh Prakash <pranesh@cis-india.org>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: Trouble running a proxy VPN
Date: Sat, 17 Jun 2017 09:56:27 +0530 [thread overview]
Message-ID: <8645b2da-6787-8b3a-737b-c3fbc8f7b6a2@cis-india.org> (raw)
In-Reply-To: <CAHmME9rRBxMvHMkGMRchDoDU1Ok7_J-nxCKydg6oo=3O+1b00g@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1524 bytes --]
Jason A. Donenfeld <Jason@zx2c4.com> [2017-06-14 13:48:45 +0200]:
> Looks like maybe you forgot to enable IP forwarding and masquerading
> on the server.
This was exactly it. Thanks for the help on the IRC as well.
I had forwarding configured for OpenVPN on a different IP range, but had
to change it for WireGuard and the IP range I was using with it.
For future novices reading this thread, the things one has to do on a
*fresh* Ubuntu installation:
Step 1: Change /proc/sys/net/ipv4/ip_forward to allow IPv4 packets to be
forwarded in this session:
$ sudo sysctl -w net.ipv4.ip_forward=1
Step 2: Change /etc/sysctl.conf to allow the forwarding of IPv4 packets
even after reboots:
$ sudo sed '/ip_forward/s/^# *//' /etc/sysctl.conf
Step 3: Enable masquerading for the IP range which is there in the
AcceptedIPs line on what is to act as the proxy server (ex: 10.10.10.0/24)
$ sudo iptables -t nat -A POSTROUTING -o <external interface> -s
10.10.10.0/24 -j MASQUERADE
... where <external interface> is something like eth0, enp0s25, wlan0,
wlp3s0, etc., depending on which network interface is being used to
connect to the Internet. You can do this by checking via:
$ ip route ls
Once you've done that, this should work
$ sudo wg-quick up <name>
Cheers,
Pranesh
--
Pranesh Prakash
Policy Director, Centre for Internet and Society
http://cis-india.org | tel:+91 80 40926283
sip:pranesh@ostel.co | xmpp:pranesh@cis-india.org
https://twitter.com/pranesh
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2017-06-17 4:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 8:00 Pranesh Prakash
2017-06-14 11:48 ` Jason A. Donenfeld
2017-06-17 4:26 ` Pranesh Prakash [this message]
2017-06-17 9:20 ` Thomas Sattler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8645b2da-6787-8b3a-737b-c3fbc8f7b6a2@cis-india.org \
--to=pranesh@cis-india.org \
--cc=Jason@zx2c4.com \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).