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

[Merged by Bors] - p2p: fix gater blocklist setup #5511

Closed
wants to merge 3 commits into from

Conversation

ivan4th
Copy link
Contributor

@ivan4th ivan4th commented Jan 29, 2024

Motivation

The IP blockslists were not initialized properly. This results in "portscans", when the node tries to contact other nodes outside its local network on their private IP. See #5510 for more information

Description

This fixes gater setup and adds test cases that were missing, causing the issue to be overlooked in the first place.

This change is related to #5510, but doesn't constitute a complete fix, as enabling the blocklists makes it impossible for the peers on the same LAN to talk to each other on their private IPs without involving NAT hairpinning, which may not be supported by the router or the ISP.

Test Plan

Ran a node with this patch applied

The IP blockslists were not initialized properly.
This change is related to #5510, but doesn't constitute a complete
fix, as enabling the blocklists makes it impossible for the peers on
the same LAN to talk to each other on their private IPs without
involving NAT hairpinning, which may not be supported by the router or
the ISP.
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (bb31280) 77.6% compared to head (49a2196) 77.6%.
Report is 2 commits behind head on develop.

Files Patch % Lines
p2p/host.go 50.0% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           develop   #5511   +/-   ##
=======================================
  Coverage     77.6%   77.6%           
=======================================
  Files          268     268           
  Lines        31211   31200   -11     
=======================================
- Hits         24242   24241    -1     
+ Misses        5439    5430    -9     
+ Partials      1530    1529    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ivan4th
Copy link
Contributor Author

ivan4th commented Jan 30, 2024

bors try

spacemesh-bors bot added a commit that referenced this pull request Jan 30, 2024
@spacemesh-bors
Copy link

try

Build failed:

@ivan4th
Copy link
Contributor Author

ivan4th commented Jan 30, 2024

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Jan 30, 2024
## Motivation

The IP blockslists were not initialized properly. This results in "portscans", when the node tries to contact other nodes outside its local network on their private IP. See #5510 for more information
@spacemesh-bors
Copy link

Build failed:

@Stizerg
Copy link

Stizerg commented Jan 30, 2024

Good job!
Next step would be to hardcode 3800 IP ranges into the blocklist and Spacemesh will be back to it healthy state

@ivan4th
Copy link
Contributor Author

ivan4th commented Jan 30, 2024

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Jan 30, 2024
## Motivation

The IP blockslists were not initialized properly. This results in "portscans", when the node tries to contact other nodes outside its local network on their private IP. See #5510 for more information
@spacemesh-bors
Copy link

Build failed:

@ivan4th
Copy link
Contributor Author

ivan4th commented Feb 5, 2024

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Feb 5, 2024
## Motivation

The IP blockslists were not initialized properly. This results in "portscans", when the node tries to contact other nodes outside its local network on their private IP. See #5510 for more information
@spacemesh-bors
Copy link

spacemesh-bors bot commented Feb 5, 2024

Pull request successfully merged into develop.

Build succeeded:

@spacemesh-bors spacemesh-bors bot changed the title p2p: fix gater blocklist setup [Merged by Bors] - p2p: fix gater blocklist setup Feb 5, 2024
@spacemesh-bors spacemesh-bors bot closed this Feb 5, 2024
@spacemesh-bors spacemesh-bors bot deleted the fix/gater-blocklists branch February 5, 2024 12:00
ivan4th added a commit that referenced this pull request Feb 5, 2024
## Motivation

The IP blockslists were not initialized properly. This results in "portscans", when the node tries to contact other nodes outside its local network on their private IP. See #5510 for more information
ivan4th added a commit that referenced this pull request Feb 5, 2024
## Motivation

The IP blockslists were not initialized properly. This results in "portscans", when the node tries to contact other nodes outside its local network on their private IP. See #5510 for more information
ivan4th added a commit that referenced this pull request Feb 5, 2024
## Motivation

The IP blockslists were not initialized properly. This results in "portscans", when the node tries to contact other nodes outside its local network on their private IP. See #5510 for more information
pigmej added a commit that referenced this pull request Feb 5, 2024
Backport #5511: p2p: fix gater blocklist setup
@pigmej pigmej mentioned this pull request Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants