dswd / vpncloud

Peer-to-peer VPN
https://vpncloud.ddswd.de
Other
1.8k stars 159 forks source link

Invalid IP addresses being assigned when compiling from source. #357

Open intjelic opened 11 months ago

intjelic commented 11 months ago

Hello,

The first installation method I used was compiling from source but then I was getting weird IPs being assigned to my NIC. Then I switched to the provided DEB packages and the bug disappeared.

Using Ubuntu 22.04, amd64, I simply compiled using this.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
sudo apt-get install -y asciidoctor
git clone  https://github.com/dswd/vpncloud.git --branch v2.3.0
cd vpncloud/
cargo build --release
sudo cp target/release/vpncloud /usr/bin

Sample of the configuration file I used (I tried many variations).

listen: 55289

crypto:
  password: <redacted>

device:
  name: "byteplug"
  type: tun
  path: "/dev/net/tun"
  fix-rp-filter: false

ip: 10.67.89.1

mode: router

port-forwarding: true

When typing ip addr, I was getting IPs like those.

12: byteplug: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1387 qdisc fq_codel state UNKNOWN group default qlen 500
    link/none 
    inet 89.1.0.0/8 scope global byteplug
       valid_lft forever preferred_lft forever
    inet6 fe80::13a5:bd44:6147:32e3/64 scope link stable-privacy 
       valid_lft forever preferred_lft forever

The logs.

2023-10-17 18:34:11 - INFO - Reading config file '/etc/vpncloud.conf'
2023-10-17 18:34:11 - INFO - Opened device byteplug
2023-10-17 18:34:11 - INFO - Setting MTU 1387 on device byteplug
2023-10-17 18:34:11 - INFO - Configuring device with ip 10.67.89.1, netmask 255.255.255.0
2023-10-17 18:34:21 - INFO - Port-forwarding: no router found
2023-10-17 18:34:21 - INFO - Auto-claiming 0.0.89.1/32 due to interface address
2023-10-17 18:34:21 - INFO - Trusted keys not set, trusting only own public key
2023-10-17 18:34:21 - INFO - Crypto speeds: AES_128_GCM: 2535.5 MiB/s, AES_256_GCM: 2067.1 MiB/s, CHACHA20_POLY1305: 1199.5 MiB/s
2023-10-17 18:34:21 - INFO - Running process as daemon

Then I installed the DEB package, and proper IPs were being assigned. Why ?

Saren-Arterius commented 9 months ago

Getting same issue with vpncloud 2.3.0-2 on AUR (archlinux/manjaro)