ugurrdemirel / wireguard-oracle-cloud-install

Wireguard VPN setup for oracle cloud
32 stars 12 forks source link

Generating wrong subnet when running add peer and configuration scripts #4

Closed junzhengca closed 2 years ago

junzhengca commented 2 years ago

When creating new configurations, it asks me for the machine's internal IP, which I assume is going to be from here:

image

but it keeps giving me error, a quick inspection shows that 10.0.0.64 is being converted to 10.0.0.64/24 and written to settings/ipv4

image

subsequently, the helper script will append 0/24 to the IP

image

it results in something weird like 10.0.0.64/240/24, which is not a valid CIDR.

Is there a bug within the script? or am I understanding something wrong?


ugurrdemirel commented 2 years ago

Hello @junzhengca , The script asks you to vpn's internal server ip. This is not related with your server ip adress. The script ask which ip adress should assign for clients. For my personal server, I typed 10.66.66.1 and when I create one more peer, internal vpn adress should be 10.66.66.2. This means wg will identify this client with 10.66.66.2. If you enter you server's ip, it will cause IP conflict.

junzhengca commented 2 years ago

This indeed works! I'll close the issue.

Thanks for the timely response.