Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Public IPs validation isn't working correctly #444

Closed
A-Harby opened this issue Dec 27, 2022 · 6 comments
Closed

Public IPs validation isn't working correctly #444

A-Harby opened this issue Dec 27, 2022 · 6 comments
Assignees
Labels
type_bug Something isn't working
Milestone

Comments

@A-Harby
Copy link
Contributor

A-Harby commented Dec 27, 2022

Description

Keep getting failing to add public config to your node without explain why and without any validation errors.
After testing every input to accept config, IPV4 was the reason.
e.g. 23.24.221.243/30

Logs/Alerts

Untitled_.Dec.27.2022.6_57.PM.webm
@coesensbert
Copy link

Not sure it's the reason but your ipv4 address is not correct if the subnet mask is /30.
The only free ip's in that range are 23.24.221.241 - 23.24.221.242
So the ip needs to be one of the two (not 23.24.221.243), and the gateway (can never be 1.1.1.1) also.
image

Ipv6 too, ::5/26 can never work online
image

I would guess the on-chain ip check would refuse such config's.

@A-Harby A-Harby changed the title Can't add public config to my node Add public config to your node validation isn't working correctly Dec 28, 2022
@A-Harby
Copy link
Contributor Author

A-Harby commented Dec 28, 2022

Faced same issue with Add Public IP to Farm, Validation passed but adding IP failed.
image

So I think public IPV4 and IPV6 needs some kind of public IP checker.

@A-Harby A-Harby changed the title Add public config to your node validation isn't working correctly Public IPs validation isn't working correctly Dec 28, 2022
@ramezsaeed ramezsaeed added this to 3.9.0 Jan 2, 2023
@ramezsaeed ramezsaeed added this to the 1.4.0 milestone Jan 2, 2023
@xmonader xmonader removed their assignment Jan 18, 2023
@xmonader xmonader added the type_bug Something isn't working label Jan 18, 2023
@DylanVerstraete
Copy link

@A-Harby status?

@rkhamis rkhamis moved this to 👀 Verification in 3.9.0 Feb 23, 2023
@A-Harby
Copy link
Contributor Author

A-Harby commented Feb 23, 2023

@A-Harby status?

The problem was with dashboard input validation rather than TFChain validation.
The inputs don't check if an IP is public or not, and they allow it then it fails to add the IP from TFChain (and the alarms don't specify what caused the failure).

@A-Harby A-Harby moved this from 👀 Verification to 🏗 In progress in 3.9.0 Feb 26, 2023
@AhmedHanafy725 AhmedHanafy725 moved this from 🏗 In progress to 🔖 Accepted in 3.9.0 Feb 26, 2023
@Omarabdul3ziz Omarabdul3ziz self-assigned this Mar 1, 2023
@Omarabdul3ziz Omarabdul3ziz moved this from 🔖 Accepted to 🏗 In progress in 3.9.0 Mar 1, 2023
@xmonader
Copy link
Contributor

xmonader commented Mar 2, 2023

Validation should be the following if the IP falls in 192.168.0.0/24 ,172.16.0.0 - 172.31.255.255 and 10.0.0.0/8 also regex logic would be cumbersome, I believe it should be done by creating a network object and checking if the ip falls in that range

@Omarabdul3ziz Omarabdul3ziz moved this from 🏗 In progress to 👀 Verification in 3.9.0 Mar 8, 2023
@A-Harby
Copy link
Contributor Author

A-Harby commented Mar 8, 2023

Verified on Devnet, v1.4.0-rc4.

Private IPs are now blocked from being added with alert message 'IP/Gateway is not public' added to clarify.
image

@A-Harby A-Harby closed this as completed Mar 8, 2023
@github-project-automation github-project-automation bot moved this from 👀 Verification to ✅ Done in 3.9.0 Mar 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type_bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants