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

Fix opening of TCP ports on GCE for inlets-pro and update existing firewall-rules if one already exists #58

Merged
merged 1 commit into from
Feb 9, 2020

Conversation

utsavanand2
Copy link
Contributor

@utsavanand2 utsavanand2 commented Feb 9, 2020

Fix opening of TCP ports on GCE for inlets-pro and update existing firewall-rules
if one already exists

Fixes #44
Fixes #56

Signed-off-by: Utsav Anand [email protected]

Description

This PR will now allow for all TCP traffic through
the inlets-pro exit node
If a firewall-rule for inlets or inlets-pro named 'inlets' already
exists, then it will update the firewall-rule with the
required rules depending on the user using the --remote-tcp
flag (inlets-pro) or not in inletsctl create command

How Has This Been Tested?

Here is an unedited screenshot depicting the update of the inlets firewall-rule
and the curl to the exit nodes provisioned with inlets-OSS and inlets-pro running
Screenshot 2020-02-09 at 5 14 25 PM
Screenshot 2020-02-09 at 5 09 23 PM
Screenshot 2020-02-09 at 5 13 45 PM

How are existing users impacted? What migration steps/scripts do we need?

Users will be able to switch between using inlets and inlets-pro through inletsctl without manually updating the firewall rules.

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • read the CONTRIBUTION guide
  • signed-off my commits with git commit -s
  • added unit tests

Allowed: []*compute.FirewallAllowed{
{
IPProtocol: "tcp",
Ports: []string{controlPort},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is incorrect, it also needs to open port 80

That's why I had an issue with it and @angelbarrera92 too

Copy link
Contributor Author

@utsavanand2 utsavanand2 Feb 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we are aleardy opening the port with the http-server tag on the exit node (every GCE project by default has the http-server flag, provided that the user has not deleted it, it works fine)
Do you want me to create one explicitly?

Copy link
Contributor Author

@utsavanand2 utsavanand2 Feb 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexellis If we're not opening the port 80 then this wouldn't have worked
Screenshot 2020-02-09 at 5 13 45 PM

Copy link
Contributor Author

@utsavanand2 utsavanand2 Feb 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added port 80 and 443 to the inlets firewall rule now. I would've added this in the beginning but have been reluctant to do so because the firewall rules in GCE have a priority number (defaults to 1000), I didn't want to create a conflict with some locked down systems where they block ingress with a much lower priority number (means firewall-rule has higher priority) and then have inconsistent behaviour. So left this decision to the user assuming most users never delete the default firewall-rules, as we're assuming that the user might not have deleted the default network. If a user deletes the default network then that would cause problems too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

443 is not required because it's not proxied by default for inlets OSS, only 8080 (control) and (80) is what should be done..

Copy link
Member

@alexellis alexellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're missing a port for inlets OSS.

This PR will now allow for all TCP traffic through
the inlets-pro exit node
If a firewall-rule for inlets or inlets-pro named 'inlets' already
exists, then it will update the firewall-rule with the
required rules depending on the user using the `--remote-tcp`
flag (inlets-pro) or not in `inletsctl create` command

Fixes inlets#44
Fixes inlets#56

Signed-off-by: Utsav Anand <[email protected]>
Copy link
Member

@alexellis alexellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@alexellis alexellis merged commit 356886f into inlets:master Feb 9, 2020
@utsavanand2 utsavanand2 changed the title Fix opening on TCP ports on GCE for inlets-pro and update existing firewall-rules if one already exists Fix opening of TCP ports on GCE for inlets-pro and update existing firewall-rules if one already exists Feb 9, 2020
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.

Broken firewall rules for GCE Fix issue with the opening of TCP ports for inlets-pro on GCE
2 participants