Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Mikma <mikma.wg@lists.m7n.se>
To: wireguard@lists.zx2c4.com,
	Nico Schottelius <nico.schottelius@ungleich.ch>,
	WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: Trying to fix the address family problem
Date: Mon, 20 Jan 2020 08:18:57 +0100	[thread overview]
Message-ID: <26602915-6F2A-47C2-9AEF-5B1384662878@lists.m7n.se> (raw)
In-Reply-To: <87iml7fsyn.fsf@ungleich.ch>



On 19 January 2020 14:58:56 CET, Nico Schottelius <nico.schottelius@ungleich.ch> wrote:

>I wanted to write a script that checks "which address family of my
>endpoint is reachable" and use wg set to update the configuration.
>
>However, it seems it is not as easy as that: inside the tunnel I am
>always using IPv6 networks and if wireguard is active with the IPv4
>family endpoint, but when I am in an IPv6 only network, I cannot reach
>the Internet due to the default rule of wg-quick:
>
>[#] ip -6 route add ::/0 dev wgungleich table 51820
>[#] ip -6 rule add not fwmark 51820 table 51820

>ping -c3 $v6_addr >/dev/null && v6_ok=yes
>ping -c3 $v4_addr >/dev/null && v4_ok=yes

It seems App-Route-Jail should be useful. Try

MARK=51820 LD_PRELOAD=./mark.so ping...

https://github.com/Intika-Linux-Firewall/App-Route-Jail/blob/master/README.md
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

      reply	other threads:[~2020-02-07 11:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-19 13:58 Nico Schottelius
2020-01-20  7:18 ` Mikma [this message]

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=26602915-6F2A-47C2-9AEF-5B1384662878@lists.m7n.se \
    --to=mikma.wg@lists.m7n.se \
    --cc=nico.schottelius@ungleich.ch \
    --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).