Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wg-quick for sunos #17

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

nshalman
Copy link

This is in support of WireGuard/wireguard-go#39

@nshalman
Copy link
Author

nshalman commented Mar 6, 2023

Updated copyright year, added a couple of extra reference links, removed some TODOs that don't actually require action (https://github.com/WireGuard/wireguard-tools/compare/8588ad10c513e50f2b051a4c48ffe33af562a9d5..491d58a4bae08bb74e82a2d372af660ee6d968b6)

@zx2c4 This is ready for your review.
491d58a 77de1e9 is the conversion of the OpenBSD version to the sunos version which might help with review, but let me know if you want me to squash that into the commit that did the simple copy.

@nshalman nshalman marked this pull request as ready for review March 6, 2023 14:19
@nshalman
Copy link
Author

nshalman commented Mar 6, 2023

Bug report from a user:

Config file (that works in Linux) with addresses with /32 appended fail

[Interface]  
ListenPort = 41953  
PrivateKey =  REDACTED
Address = 10.254.254.1/32  
  
[Peer]  
PublicKey =  REDACTED
PersistentKeepalive = 25  
AllowedIPs = 10.254.254.3/32  
[root@vpn1 /etc/wireguard]# wg-quick up tun0  
[#] wireguard-go tun  
[#] sleep 0.1  
[+] Interface for tun0 is tun0  
[#] ipadm create-addr -t -T static -a local=10.254.254.1/32,remote=10.254.254.1/32 tun0/tun00  
ipadm: Error in setting remote address: Invalid address  

But it works if the user removes the /32 from the addresses.

[root@vpn1 /etc/wireguard]# wg-quick up tun0  
[#] wireguard-go tun  
[#] sleep 0.1  
[+] Interface for tun0 is tun0  
[#] ipadm create-addr -t -T static -a local=10.254.254.1,remote=10.254.254.1 tun0/tun00  
[#] wg setconf tun0 /dev/fd/63  
[#] ifconfig tun0 mtu 1420  
[#] route -q -n add -inet 10.254.254.3/32 -iface 10.254.254.1  
add host 10.254.254.3/32: gateway 10.254.254.1  
[+] Backgrounding route monitor  
[root@vpn1 /etc/wireguard]# ping 10.254.254.3  
PING 10.254.254.3: 56 data bytes  
64 bytes from 10.254.254.3: icmp_seq=0. time=30.550 ms  

I'm pretty sure this isn't the first time I've seen ipadm get upset with addresses like those.

@nshalman
Copy link
Author

nshalman commented Mar 6, 2023

@nshalman
Copy link
Author

@zx2c4 please review when you have time. Goes along with WireGuard/wireguard-go#39

@nshalman nshalman changed the title wg-quick for illumos wg-quick for sunos Mar 14, 2023
@nshalman nshalman marked this pull request as draft March 14, 2023 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant