All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: wireguard@lists.zx2c4.com
Subject: [WireGuard] Using wireguard link as a proxy?
Date: Thu, 21 Jul 2016 15:57:42 -0500	[thread overview]
Message-ID: <20160721205742.GA10312@wolff.to> (raw)

I am trying to test using a wireguard link as a proxy and I am having trouble. 
On the source machine I am trying to route packets through wg0 using a 
routing entry that has the remote end point tunnel address on a via command. 
The idea is to have the packets sent through the tunnel and then to do 
source nat on the remote side of the tunnel. The packets go to the interface, 
but do not come out the other end. Ping reports:
>From 192.168.7.2 icmp_seq=69 Destination Host Unreachable
ping: sendmsg: Required key not available

So I think the destination address in the packet is being used to find the 
tunnel key to use rather than the immediate next destination for the packet.

Has anyone else played with something like this an gotten it to work? 

Some info on what I was trying:
ip route
default via 129.89.248.129 dev em1  proto static  metric 100 
98.103.208.26 via 192.168.7.1 dev wg0 
129.89.248.128/27 dev em1  proto kernel  scope link  src 129.89.248.147  metric 100 
192.168.7.1 dev wg0  proto kernel  scope link  src 192.168.7.2 

wg source machine
  endpoint: 98.103.208.27:992
  allowed ips: 192.168.7.1/32

wg proxy machine
  endpoint: 129.89.248.147:992
  allowed ips: 192.168.7.2/32

tcpdump output from wg0
15:54:34.129798 IP 192.168.7.2 > 98.103.208.26: ICMP echo request, id 25371, seq 1, length 64

             reply	other threads:[~2016-07-21 20:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21 20:57 Bruno Wolff III [this message]
2016-07-22  8:18 ` [WireGuard] Using wireguard link as a proxy? Baptiste Jonglez
2016-07-22  9:09   ` Bruno Wolff III
2016-07-22  9:32     ` Baptiste Jonglez
2016-07-22 11:32       ` Bruno Wolff III
2016-07-22 12:42         ` Jason A. Donenfeld
2016-07-22 15:14           ` Bruno Wolff III
2016-07-22 15:30             ` Jason A. Donenfeld
2016-07-22 16:13               ` Bruno Wolff III
2016-07-22 18:05               ` Bruno Wolff III
2016-07-23 16:36                 ` Bruno Wolff III
2016-07-23 17:25                   ` Bruno Wolff III
2016-07-25 12:57                     ` Jason A. Donenfeld
2016-07-25 15:40                       ` Bruno Wolff III
2016-07-22 15:35             ` Quan Zhou
2016-07-22 16:02               ` Bruno Wolff III

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=20160721205742.GA10312@wolff.to \
    --to=bruno@wolff.to \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.