ZebMcKayhan
Very Senior Member
not that I'm aware of. you will have to capure it from the terminal window... still not working eah?Hey! Does the output from diag cmd gets saved as a file?
//Zeb
not that I'm aware of. you will have to capure it from the terminal window... still not working eah?Hey! Does the output from diag cmd gets saved as a file?
The SSH client is the best method to record the info to a file, ....although you can cut'n'paste etc. but that can be tedious.. although you can copy either the 'screen' or 'session'Hey! Does the output from diag cmd gets saved as a file?
XShell6
(it's free for home use) so you start the logging.....@ZebMcKayhan
I have implemented your suggestion to auto-import Vendor supplied .conf files into the next available WireGuard designated interface 'slot' on the router, and relegated the use ofimport xxxxxx[.conf] name=
requests for advanced users.
e.g. I already have 4 WireGuard 'client' peers configured (interfaces wg11 thru' wg14), and requested the import of Mullvad's file
'/opt/etc/wireguard.d/mlvd-us53.conf'
Code:E:Option ==> import mlvd-us53 [✔] Config mlvd-us53 import as wg15 success
This should eliminate all future end-user confusion/frustration ( as reported by new user @Stingray123 ) as the very first import request should now by default create wg11 (rather than mlvd-us53 as it would have done previously as allowed per the officialwg=quick
documentation)
dev
and main
branches the RPDB build principles have changed, I believe. wgm
working well (and very well) over the last several months. I built the routing tables based on your early view at http://www.snbforums.com/threads/se...discussion-2nd-thread-75129.70787/post-695607.asmin@RT-AX86U:/tmp/mnt/asus/conf# ip rule
0: from all lookup local
220: from all lookup 220
9810: from all fwmark 0xd2 lookup 210
9890: from all fwmark 0x8000/0x8000 lookup main
9892: from all fwmark 0x7010/0x7010 lookup 124
9893: from all fwmark 0x4010/0x4010 lookup 123
9894: from all fwmark 0x2010/0x2010 lookup 122
9895: from all fwmark 0x1010/0x1010 lookup 121
9911: from 192.168.1.246 lookup 121
9911: from 192.168.1.230 lookup 121
9990: from all fwmark 0x8000/0x8000 lookup main
9992: from all fwmark 0x7000/0x7000 lookup ovpnc4
9994: from all fwmark 0x2000/0x2000 lookup ovpnc2
9995: from all fwmark 0x1000/0x1000 lookup ovpnc1
10210: from 192.168.1.237 lookup ovpnc1
10211: from 192.168.1.253 lookup ovpnc1
10212: from 192.168.1.238 lookup ovpnc1
32766: from all lookup main
32767: from all lookup default
asmin@RT-AX86U:/tmp/mnt/asus/conf# ip rule
0: from all lookup local
220: from all lookup 220
9810: from all fwmark 0xd2 lookup 210
9911: from 192.168.1.246 lookup 121
9911: from 192.168.1.230 lookup 121
9990: from all fwmark 0x8000/0x8000 lookup main
9991: from all fwmark 0x1010/0x1010 lookup 121
9992: from all fwmark 0x7000/0x7000 lookup ovpnc4
9992: from all fwmark 0x2010/0x2010 lookup 122
9993: from all fwmark 0x4010/0x4010 lookup 123
9994: from all fwmark 0x2000/0x2000 lookup ovpnc2
9994: from all fwmark 0x7010/0x7010 lookup 124
9995: from all fwmark 0x1000/0x1000 lookup ovpnc1
10210: from 192.168.1.237 lookup ovpnc1
10211: from 192.168.1.253 lookup ovpnc1
10212: from 192.168.1.238 lookup ovpnc1
32766: from all lookup main
32767: from all lookup default
main
table makes sense.Initially with@Martineau, I'm looking for some direction here. During the last updates todev
andmain
branches the RPDB build principles have changed, I believe.
I had (and have)wgm
working well (and very well) over the last several months. I built the routing tables based on your early view at http://www.snbforums.com/threads/se...discussion-2nd-thread-75129.70787/post-695607.
It all looked like that:
Code:asmin@RT-AX86U:/tmp/mnt/asus/conf# ip rule 0: from all lookup local 220: from all lookup 220 9810: from all fwmark 0xd2 lookup 210 9890: from all fwmark 0x8000/0x8000 lookup main 9892: from all fwmark 0x7010/0x7010 lookup 124 9893: from all fwmark 0x4010/0x4010 lookup 123 9894: from all fwmark 0x2010/0x2010 lookup 122 9895: from all fwmark 0x1010/0x1010 lookup 121 9911: from 192.168.1.246 lookup 121 9911: from 192.168.1.230 lookup 121 9990: from all fwmark 0x8000/0x8000 lookup main 9992: from all fwmark 0x7000/0x7000 lookup ovpnc4 9994: from all fwmark 0x2000/0x2000 lookup ovpnc2 9995: from all fwmark 0x1000/0x1000 lookup ovpnc1 10210: from 192.168.1.237 lookup ovpnc1 10211: from 192.168.1.253 lookup ovpnc1 10212: from 192.168.1.238 lookup ovpnc1 32766: from all lookup main 32767: from all lookup default
I noted that you recently removed the requirement to have at least one client per interface in order to be able to route IPSets, so I removed the dummies and it all looked cleaner.
Now, late in the weekend with the last update I think I've seen the routing re-arranged as follows:
Code:asmin@RT-AX86U:/tmp/mnt/asus/conf# ip rule 0: from all lookup local 220: from all lookup 220 9810: from all fwmark 0xd2 lookup 210 9911: from 192.168.1.246 lookup 121 9911: from 192.168.1.230 lookup 121 9990: from all fwmark 0x8000/0x8000 lookup main 9991: from all fwmark 0x1010/0x1010 lookup 121 9992: from all fwmark 0x7000/0x7000 lookup ovpnc4 9992: from all fwmark 0x2010/0x2010 lookup 122 9993: from all fwmark 0x4010/0x4010 lookup 123 9994: from all fwmark 0x2000/0x2000 lookup ovpnc2 9994: from all fwmark 0x7010/0x7010 lookup 124 9995: from all fwmark 0x1000/0x1000 lookup ovpnc1 10210: from 192.168.1.237 lookup ovpnc1 10211: from 192.168.1.253 lookup ovpnc1 10212: from 192.168.1.238 lookup ovpnc1 32766: from all lookup main 32767: from all lookup default
It all works now (there is little to nothing one can't do with the -route-up/down and -up/down scripts.)
I can see that not having 2 WAN routes to themain
table makes sense.
The question remains what was the leading factor to the change? And why the change from the earlier priority definition for routing clients running on different protocols?
wireguard_manager
, I didn't want to have different fwmarks for both my original OpenVPN and WireGuard design.Looking good, Again!@ZebMcKayhan
I have implemented your suggestion to auto-import Vendor supplied .conf files into the next available WireGuard designated interface 'slot' on the router, and relegated the use ofimport xxxxxx[.conf] name=
requests for advanced users.
e.g. I already have 4 WireGuard 'client' peers configured (interfaces wg11 thru' wg14), and requested the import of Mullvad's file
'/opt/etc/wireguard.d/mlvd-us53.conf'
Code:E:Option ==> import mlvd-us53 [✔] Config mlvd-us53 import as wg15 success
This should eliminate all future end-user confusion/frustration ( as reported by new user @Stingray123 ) as the very first import request should now by default create wg11 (rather than mlvd-us53 as it would have done previously as allowed per the officialwg=quick
documentation)
View attachment 36869
NOTE: If the .conf file has a 'wg1' prefix then it will be honoured as the target interface name (assuming it is not already in use), unless overridden by the suppliedname=
directive.
e.g. Advanced users who may wish to retain 'mlvd-us53' as the WireGuard 'client' peer interface name would need to use:
Code:E:Option ==> import mlvd-us53 name=mlvd-us53
Please downloadwireguard_manager
v4.12b2 from the dev branch to test at your convenience.
Code:e = Exit Script [?] E:Option ==> uf dev v4.12b2 WireGuard Session Manager (Change Log: https://github.com/MartineauUK/wireguard/commits/dev/wg_manager.sh) MD5=f38a9aadaf71ce119e83b83eebd602a9 /jffs/addons/wireguard/wg_manager.sh <snip>
E:Option ==> import IntegritySE
[✔] Config IntegritySE import as wg13 success
E:Option ==> peer wg13 del
Deleting 'client' Peer (wg13)
Press y to CONFIRM or press [Enter] to SKIP.
y
'client' Peer wg13 DELETED
mv IntegritySE.conf_imported IntegritySE.conf
E:Option ==> import IntegritySE.conf
[✔] Config IntegritySE import as wg13 success
mv IntegritySE.conf_imported IntegritySE.conf
E:Option ==> import IntegritySE name=wg15
[✔] Config IntegritySE import as wg15 success
mv IntegritySE.conf_imported IntegritySE.Whatever
E:Option ==> import IntegritySE.Whatever
***ERROR: WireGuard 'client' Peer (/opt/etc/wireguard.d/IntegritySE.Whatever) config NOT found?....skipping import Peer 'IntegritySE.Whatever' request
mv IntegritySE.Whatever Integrity.SE.conf
E:Option ==> import Integrity.SE
[✔] Config Integrity.SE import as wg13 success
Thanks for taking the time to post your detailed and methodical/comprehensive tests...Quality Assurance engineering background perhaps?Looking good, Again!
as I didnt wanna mess up existing configs (I can only generate 5, when I generate the 6:th the first one gets disabled, on the other hand they seem to live forever) so I modified the keys of an existing one, just to get the import:
named it IntegritySE.conf
it gets imported as wg13 as wg11 and wg12 is already used.Code:E:Option ==> import IntegritySE [✔] Config IntegritySE import as wg13 success
IntegritySE.conf gets renamed to IntegritySE.conf_imported and wg13.conf is the result of the import.
Code:E:Option ==> peer wg13 del Deleting 'client' Peer (wg13) Press y to CONFIRM or press [Enter] to SKIP. y 'client' Peer wg13 DELETED
wg13.conf is removed.
Code:mv IntegritySE.conf_imported IntegritySE.conf
testing full name import
Code:E:Option ==> import IntegritySE.conf [✔] Config IntegritySE import as wg13 success
Code:mv IntegritySE.conf_imported IntegritySE.conf
testing name= option:
Code:E:Option ==> import IntegritySE name=wg15 [✔] Config IntegritySE import as wg15 success
testing different ending:
Code:mv IntegritySE.conf_imported IntegritySE.Whatever
nope... the file ending must be .confCode:E:Option ==> import IntegritySE.Whatever ***ERROR: WireGuard 'client' Peer (/opt/etc/wireguard.d/IntegritySE.Whatever) config NOT found?....skipping import Peer 'IntegritySE.Whatever' request
testing additional . :
Code:mv IntegritySE.Whatever Integrity.SE.conf
Code:E:Option ==> import Integrity.SE [✔] Config Integrity.SE import as wg13 success
seems rock-solid! great work!
so as long as the file has a .conf ending there shouldnt be any problem.
//Zeb
Edit: also tried IntegritySE without .conf but it wouldnt import... so make sure the filename is xxxxxxxx.conf and it will work!
Ooh, the shame!!Quality Assurance engineering background perhaps?
Yes.@Martineau, something totally cosmetic. Is it possible to tag route table 121 as wgvpnc1?
I see the file but it is read only.
/etc/iproute2/rt_tables
Something like this in your old post possible?
Port Forward while using VPN Client
Router: ASUS RT-AC87U Firmware: 378.56_2 I am currently using the VPN Client on my router to selective tunnel traffic to/from some of the LAN clients. In other words, I have "Redirect Internet traffic" set to "Policy Rules"... ..and I have rules for some of the LAN clients where I specify...www.snbforums.com
init-start
) to mount your custom name table.if [ -f /jffs/configs/rt_tables ]; then
# Use custom table
logger -st "($(basename $0))" "Custom RPDB name table /jffs/configs/rt_tables replaces /etc/iproute2/rt_tables"
mount -o bind /jffs/configs/rt_tables /etc/iproute2/rt_tables # Override 'ovpncX' with 'TalkTalk', NewYork etc.
# df
# umount /rom/etc/iproute2/rt_tables
fi
df
, then use umount
prior to making more edits before remounting.df
Filesystem 1K-blocks Used Available Use% Mounted on
ubi:rootfs_ubifs 79016 66148 12868 84% /
devtmpfs 220048 4 220044 0% /dev
tmpfs 220160 420 219740 0% /var
tmpfs 220160 1660 218500 1% /tmp/mnt
mtd:bootfs 4480 3364 1116 75% /bootfs
tmpfs 220160 1660 218500 1% /tmp/mnt
mtd:data 8192 636 7556 8% /data
tmpfs 220160 1660 218500 1% /tmp
/dev/mtdblock9 48128 6188 41940 13% /jffs
/dev/sda1 14779860 3458076 10570988 25% /tmp/mnt/RT-AC86U
cat /etc/iproute2/rt_tables
100 wan0
111 ovpnc1
112 ovpnc2
113 ovpnc3
114 ovpnc4
115 ovpnc5
200 wan1
cat /jffs/configs/rt_tables
100 wan0
111 ovpnc1
112 ovpnc2
113 ovpnc3
114 ovpnc4
115 ovpnc5
200 wan1
# Custom Wireguard - Martineau
121 wgvpnc1
122 wgvpnc2
123 wgvpnc3
124 wgvpnc4
125 wgvpnc5
mount -o bind /jffs/configs/rt_tables /etc/iproute2/rt_tables
df
Filesystem 1K-blocks Used Available Use% Mounted on
ubi:rootfs_ubifs 79016 66148 12868 84% /
devtmpfs 220048 4 220044 0% /dev
tmpfs 220160 420 219740 0% /var
tmpfs 220160 1656 218504 1% /tmp/mnt
mtd:bootfs 4480 3364 1116 75% /bootfs
tmpfs 220160 1656 218504 1% /tmp/mnt
mtd:data 8192 636 7556 8% /data
tmpfs 220160 1656 218504 1% /tmp
/dev/mtdblock9 48128 6196 41932 13% /jffs
/dev/sda1 14779860 3458076 10570988 25% /tmp/mnt/RT-AC86U
/dev/mtdblock9 48128 6196 41932 13% /rom/etc/iproute2/rt_tables
cat /etc/iproute2/rt_tables
100 wan0
111 ovpnc1
112 ovpnc2
113 ovpnc3
114 ovpnc4
115 ovpnc5
200 wan1
# Custom Wireguard - Martineau
121 wgvpnc1
122 wgvpnc2
123 wgvpnc3
124 wgvpnc4
125 wgvpnc5
ip route show table 121
0.0.0.0/1 dev wg11 scope link
128.0.0.0/1 dev wg11 scope link
192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.1
ip route show table wgvpnc1
0.0.0.0/1 dev wg11 scope link
128.0.0.0/1 dev wg11 scope link
192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.1
I decided to ensure that the WireGuard configuration file used by theEdit: also tried IntegritySE without .conf but it wouldnt import... so make sure the filename is xxxxxxxx.conf and it will work!
wireguard_manager import
feature would adhere to the WIreGuard naming standard as expected by wg-quick
e.g. xxxxxx.confVery nice. It works well.Yes.
e.g. Clone '/etc/iproute2/rt_tables' to '/jffs/configs/rt_tables' then when you have modified ''/jffs/configs/rt_tables'' use the following in the appropriate script ( I useinit-start
) to mount your custom name table.
You can check if the file is mounted usingCode:if [ -f /jffs/configs/rt_tables ]; then # Use custom table logger -st "($(basename $0))" "Custom RPDB name table /jffs/configs/rt_tables replaces /etc/iproute2/rt_tables" mount -o bind /jffs/configs/rt_tables /etc/iproute2/rt_tables # Override 'ovpncX' with 'TalkTalk', NewYork etc. # df # umount /rom/etc/iproute2/rt_tables fi
df
, then useumount
prior to making more edits before remounting.
Display contents of readonly file....Code:df Filesystem 1K-blocks Used Available Use% Mounted on ubi:rootfs_ubifs 79016 66148 12868 84% / devtmpfs 220048 4 220044 0% /dev tmpfs 220160 420 219740 0% /var tmpfs 220160 1660 218500 1% /tmp/mnt mtd:bootfs 4480 3364 1116 75% /bootfs tmpfs 220160 1660 218500 1% /tmp/mnt mtd:data 8192 636 7556 8% /data tmpfs 220160 1660 218500 1% /tmp /dev/mtdblock9 48128 6188 41940 13% /jffs /dev/sda1 14779860 3458076 10570988 25% /tmp/mnt/RT-AC86U
Display contents of customised fileCode:cat /etc/iproute2/rt_tables 100 wan0 111 ovpnc1 112 ovpnc2 113 ovpnc3 114 ovpnc4 115 ovpnc5 200 wan1
Mount the custom file over the readonly fileCode:cat /jffs/configs/rt_tables 100 wan0 111 ovpnc1 112 ovpnc2 113 ovpnc3 114 ovpnc4 115 ovpnc5 200 wan1 # Custom Wireguard - Martineau 121 wgvpnc1 122 wgvpnc2 123 wgvpnc3 124 wgvpnc4 125 wgvpnc5
Code:mount -o bind /jffs/configs/rt_tables /etc/iproute2/rt_tables df Filesystem 1K-blocks Used Available Use% Mounted on ubi:rootfs_ubifs 79016 66148 12868 84% / devtmpfs 220048 4 220044 0% /dev tmpfs 220160 420 219740 0% /var tmpfs 220160 1656 218504 1% /tmp/mnt mtd:bootfs 4480 3364 1116 75% /bootfs tmpfs 220160 1656 218504 1% /tmp/mnt mtd:data 8192 636 7556 8% /data tmpfs 220160 1656 218504 1% /tmp /dev/mtdblock9 48128 6196 41932 13% /jffs /dev/sda1 14779860 3458076 10570988 25% /tmp/mnt/RT-AC86U /dev/mtdblock9 48128 6196 41932 13% /rom/etc/iproute2/rt_tables
Check the WireGuard routing table alias now workCode:cat /etc/iproute2/rt_tables 100 wan0 111 ovpnc1 112 ovpnc2 113 ovpnc3 114 ovpnc4 115 ovpnc5 200 wan1 # Custom Wireguard - Martineau 121 wgvpnc1 122 wgvpnc2 123 wgvpnc3 124 wgvpnc4 125 wgvpnc5
Code:ip route show table wgvpnc1 0.0.0.0/1 dev wg11 scope link 128.0.0.0/1 dev wg11 scope link 192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.1 ip route show table 121 0.0.0.0/1 dev wg11 scope link 128.0.0.0/1 dev wg11 scope link 192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.1
Correct, and exactly how I recommend.Very nice. It works well.
Just added the script into init-start. I suppose this is required so that the custom rt-tables get mounted again during the next reboot.
Thanks again. Yes, there is one part of the script I can change from ...table 12$WGVPN_ID to ...table wgvpnc$WGVPN_ID. Actually I have get used to your numbering and I can keep it as is.Correct, and exactly how I recommend.
I'm not sure how the future firmware implementation will make it human-friendly (if at all), but currently the custom WireGuard routing table alias could be anything e.g. 'NewYork' etc., unless your scripts need/expect to have a formal 'wgvpnc' prefix.
no, they dont... they are only .conf named. I dont know how all others are though but I agree that wgm should require the .conf to make sure we are trying to import something compatible.If IntegritySE does allow their created config 'IntegritySE' to be used (or retrieved) as-is without the .conf suffix
***ERROR: WireGuard 'client' Peer (/opt/etc/wireguard.d/IntegritySE.Whatever) config NOT found?....skipping import Peer 'IntegritySE.Whatever' request
***ERROR: WireGuard 'client' Peer (/opt/etc/wireguard.d/IntegritySE.Whatever.conf) NOT found?....skipping import Peer 'IntegritySE.Whatever' request
what happens if you import the Wireguard.db by mistake
e = Exit Script [?]
E:Option ==> import WireGuard.db
***ERROR: WireGuard 'client' Peer (/opt/etc/wireguard.d/WireGuard.db) config NOT found?....skipping import Peer 'WireGuard.db' request
e = Exit Script [?]
E:Option ==> import ?
Available Peer Configs for import:
SGS8.conf
mlvd-us53.conf
ubimo.conf
Maybe indeedMaybee it should be:
then there is a chance for the user to realize what needs to be done and why it didnt work.Code:***ERROR: WireGuard 'client' Peer (/opt/etc/wireguard.d/IntegritySE.Whatever.conf) NOT found?....skipping import Peer 'IntegritySE.Whatever' request
@DreaZHey! Does the output from diag cmd gets saved as a file?
ok, lets hope @Martineau finds anything that could be fixed.Yes :\ I've confirmed that there was a issue with the killswitch in 4.11 and have permanently disabled it in 4.12b2 for now. But I still have the same issue when I start wg11 Internet dies, I can't reach 'anything'. As soon as I stop it, Internet works again. I don't have this issue with OpenVPN on the router or when I try the exact same Wireguard key in another device.
And I can't see anything wrong in the imported Wireguard key in WGM. The only difference I see is that I DNS and Address is disabled with # in front of them.
I'm not familiar with Linux and iptables at all, so the wgm diag doesn't say anything to me. But I did sent it to @Martineau
I'm on Merlin fw RT-AC86U_386.3_2 for my Asus RT-AC86U
WAN on the Router:
I have tried different DNS (Cloudflare and my VPN Provider) and automatic from ISP
Disabled Rebind protection and DNSSEC
LAN on the router:
DNSFilter is enabled and Global set to Router
Restarted router within the gui and also tried a hard restart.
Disabled Skynet and Diversion just in case.
But yea... the issue remains...
ping 142.250.74.36
peer wg11 dns=9.9.9.9
restart wg11
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!