netfishers-onl / Netshot

Network Configuration and Compliance Management
http://www.netfishers.onl/netshot
249 stars 60 forks source link

Conflict adding devices using same IP #283

Open adrianodsb opened 10 months ago

adrianodsb commented 10 months ago

Hello,

I have a few devices sitting behing a NAT and due to this they share the same public IP address but using different ports to be reachable though SSH.

When I try do add them, Netshot throws the error below:

Error: The device '<DEVICE NAME>' already exists with this IP address.

Is there any possibility to allow this so I can backup those devices?

Thank you!

TLigniere commented 10 months ago

As a temporary solution you could try to use a dynamic NAT for those devices. It's just a suggestion though.

SCadilhac commented 10 months ago

You can declare your device under its private IP address, but use the Override connection settings option in Add device dialog to define the effective IP address (and TCP port) to connect to.

adrianodsb commented 10 months ago

Done as @SCadilhac suggested and it worked just fine!

Thank you!

I also have some devices that use dynamic DNS and I noticed that Netshot always translates FQDNs to IPs when it adds the device. Is there a way to force Netshot to stick with the FQDN instead?

SCadilhac commented 10 months ago

I also have some devices that use dynamic DNS and I noticed that Netshot always translates FQDNs to IPs when it adds the device. Is there a way to force Netshot to stick with the FQDN instead?

Not supported at the moment but this is definitively something that we should add soon.

adrianodsb commented 10 months ago

I also have some devices that use dynamic DNS and I noticed that Netshot always translates FQDNs to IPs when it adds the device. Is there a way to force Netshot to stick with the FQDN instead?

Not supported at the moment but this is definitively something that we should add soon.

I'm gonna work on something to bypass this limitation in the mean time.

adrianodsb commented 10 months ago

You can declare your device under its private IP address, but use the Override connection settings option in Add device dialog to define the effective IP address (and TCP port) to connect to.

About this, It works, however, with a high number of devices, quite often some of them happen to use the same network segments for internal interfaces and Netshot throws the same error I mentioned in the first comment.

For those cases I thought about setting fake addresses or using an IP from another interface, not sure if it's the best approach, sounds a little dirty.

I accept other suggestions.

Thanks @SCadilhac