Skip to content

Conversation

@harpomaxx
Copy link
Collaborator

This PR fixes an issue where dynamic addresses in the firewall were not working correctly. The main cause was a mismatch between original and remapped IP addresses during environment resets.

Main Changes

  1. Avoid resetting the firewall with original IPs when resetting the environment.
  2. Remap known_data IPs from the taskfile configuration to ensure consistency.

Details

Firewall Reset Issue

  • Previously, in the reset() method, self._firewall was being restored using the original network IPs stored in firewall_original.
  • However, all other structures retained the remapped IPs, leading to a mismatch.
  • When attempting to remap the firewall again, a KeyError was raised because the firewall contained original IPs while the rest of the system expected remapped ones.
  • Fix Now, self._firewall retains the remapped IPs during reset, preventing the mismatch and subsequent errors.

Incorrect known_data IP Mapping in Goal Conditions

  • The goal conditions in coordinator.py rely on IPs from the task config file.
  • The issue was that known_data IPs were never remapped, causing agents to exfiltrate data to the wrong internet IP instead of the one specified in the taskfile.
  • ** Fix:** Added logic to remap known_data IPs in the taskfile, ensuring consistency across all components.

These changes should resolve the issue, but further testing is recommended. ✅

@eldraco eldraco self-requested a review March 19, 2025 10:54
@ondrej-lukas ondrej-lukas merged commit bfcf259 into main Mar 25, 2025
2 checks passed
@ondrej-lukas ondrej-lukas deleted the harpo-firewall-quickfix branch March 25, 2025 16:23
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