-
Notifications
You must be signed in to change notification settings - Fork 62
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
Conversation
pkg/provision/gce.go
Outdated
Allowed: []*compute.FirewallAllowed{ | ||
{ | ||
IPProtocol: "tcp", | ||
Ports: []string{controlPort}, |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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..
There was a problem hiding this 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]>
55d04cb
to
a94db3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
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
commandHow Has This Been Tested?
Here is an unedited screenshot depicting the update of the
![Screenshot 2020-02-09 at 5 14 25 PM](https://user-images.githubusercontent.com/25264581/74101589-649ad100-4b61-11ea-8b3f-bb53999f6c92.png)
![Screenshot 2020-02-09 at 5 09 23 PM](https://user-images.githubusercontent.com/25264581/74101596-6c5a7580-4b61-11ea-82fa-6599dcb3f858.png)
![Screenshot 2020-02-09 at 5 13 45 PM](https://user-images.githubusercontent.com/25264581/74101600-77150a80-4b61-11ea-9e5e-f06653e68309.png)
inlets
firewall-ruleand the curl to the exit nodes provisioned with inlets-OSS and inlets-pro running
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:
git commit -s