WireGuard Archive on lore.kernel.org
 help / color / Atom feed
From: Steven Honson <steven@honson.id.au>
To: "Adrián Mihálko" <adriankoooo@gmail.com>
Cc: wireguard@lists.zx2c4.com
Subject: Re: Wireguard behind NAT
Date: Sat, 8 Sep 2018 01:17:54 +1000
Message-ID: <EA3885D6-7DD4-4DE2-B53A-25B7A7DC270F@honson.id.au> (raw)
In-Reply-To: <CA+Hw3eaWT76rB1eAEVM4DOMr_t3GkU07crF_aq8x8Vkww-DeZg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1462 bytes --]

Hi Adrian,

As SIDE_B has a public IP address, the example you give should work fine. In this case, SIDE_A will establish a connection with SIDE_B which effectively punches a NAT hole for return traffic from SIDE_B to SIDE_A.

When configuring the SIDE_A peer on SIDE_B, just leave EndPoint unset.

Inversely, when configuring the SIDE_B peer on SIDE_A, use the dynamic DNS name (and the port that SIDE_B is listening on).

The NAT Hole Punching example Jason provided is more applicable to situations where both WireGuard peers are NATed. In your example it sounds like this is only the case for SIDE_A.

Cheers,
Steven

> On 3 Sep 2018, at 5:51 am, Adrián Mihálko <adriankoooo@gmail.com> wrote:
> 
> Is there any way to connect to Wireguard behind a Carrier-grade NAT? 
> 
> On SIDE_A I have a backup LTE connection, without proper public ip, only dynamic ip and I server with Wireguard. 
> 
> SIDE_A = mobile LTE connection, without public IP, behind carrier grade NAT 
> SIDE_A_SERVER = WIREGUARD (connecting to sideb.dyndns.org <http://sideb.dyndns.org/>) 
> 
> SIDE_B = VDSL with public ip + ddns (sideb.dyndns.org <http://sideb.dyndns.org/>) 
> SIDE_B_SERVER = WIREGUARD (cannot connect to SIDE_A, because no public ip on SIDE_A) 
> 
> 
> Best regards, 
> Adrian
> _______________________________________________
> WireGuard mailing list
> WireGuard@lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/wireguard


[-- Attachment #2: Type: text/html, Size: 2607 bytes --]

<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Adrian,<div class=""><br class=""></div><div class="">As SIDE_B has a public IP address, the example you give should work fine. In this case, SIDE_A will establish a connection with SIDE_B which effectively punches a NAT hole for return traffic from SIDE_B to SIDE_A.</div><div class=""><br class=""></div><div class="">When configuring the SIDE_A peer on SIDE_B, just leave EndPoint unset.</div><div class=""><br class=""></div><div class="">Inversely, when configuring the SIDE_B peer on SIDE_A, use the dynamic DNS name (and the port that SIDE_B is listening on).</div><div class=""><br class=""></div><div class="">The NAT Hole Punching example Jason provided is more applicable to situations where both WireGuard peers are NATed. In your example it sounds like this is only the case for SIDE_A.</div><div class=""><br class=""></div><div class=""><div class="">Cheers,</div><div class="">Steven</div></div><div><br class=""><blockquote type="cite" class=""><div class="">On 3 Sep 2018, at 5:51 am, Adrián Mihálko &lt;<a href="mailto:adriankoooo@gmail.com" class="">adriankoooo@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Is there any way to connect to Wireguard behind a Carrier-grade NAT?&nbsp;<div class=""><br class=""></div><div class="">On SIDE_A I have a backup LTE connection, without proper public ip, only dynamic ip and I server with Wireguard.&nbsp;</div><div class=""><br class=""></div><div class="">SIDE_A = mobile LTE connection, without public IP, behind carrier grade NAT&nbsp;</div><div class="">SIDE_A_SERVER = WIREGUARD (connecting to <a href="http://sideb.dyndns.org/" class="">sideb.dyndns.org</a>)&nbsp;</div><div class=""><br class=""></div><div class="">SIDE_B = VDSL with public ip + ddns (<a href="http://sideb.dyndns.org/" class="">sideb.dyndns.org</a>)&nbsp;</div><div class="">SIDE_B_SERVER = WIREGUARD (cannot connect to SIDE_A, because no public ip on SIDE_A)&nbsp;</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Best regards,&nbsp;</div><div class="">Adrian</div></div>
_______________________________________________<br class="">WireGuard mailing list<br class=""><a href="mailto:WireGuard@lists.zx2c4.com" class="">WireGuard@lists.zx2c4.com</a><br class="">https://lists.zx2c4.com/mailman/listinfo/wireguard<br class=""></div></blockquote></div><br class=""></body></html>

  parent reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-02 19:51 Adrián Mihálko
2018-09-07  3:39 ` Jason A. Donenfeld
2018-09-07 15:17 ` Steven Honson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-09-03 10:28 Adrián Mihálko
2018-09-03 10:43 ` Ole-Morten Duesund
2018-09-03 10:55   ` Roman Mamedov
2018-09-03 10:59     ` Ole-Morten Duesund
2018-03-12 11:22 Adrián Mihálko
2018-04-14  2:06 ` Jason A. Donenfeld

Reply instructions:

You may reply publically 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=EA3885D6-7DD4-4DE2-B53A-25B7A7DC270F@honson.id.au \
    --to=steven@honson.id.au \
    --cc=adriankoooo@gmail.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

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com zx2c4-wireguard@archiver.kernel.org
	public-inbox-index wireguard


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/ public-inbox