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

iptables v1.6.0: invalid port/service `-j' specified #1

Closed
jsindy opened this issue Dec 12, 2016 · 3 comments
Closed

iptables v1.6.0: invalid port/service `-j' specified #1

jsindy opened this issue Dec 12, 2016 · 3 comments

Comments

@jsindy
Copy link

jsindy commented Dec 12, 2016

Getting this error on google compute engine. Ubuntu 16.10 image.

iptables v1.6.0: invalid port/service -j' specified Try iptables -h' or 'iptables --help' for more information.

@jawj
Copy link
Owner

jawj commented Dec 13, 2016

I suspect this is happening because an environment variable is empty. Candidates could be SSHPORT (did you make sure to fill that in when prompted?) or ETH0ORSIMILAR (which would be down to my detection method for the main Internet interface not working on Google).

Afraid I haven't got time at present to investigate (which would mean trying to set up on Google myself), but please do post if you figure out how to resolve this.

The script is tested so far on Linode and OVH.

@jsindy
Copy link
Author

jsindy commented Dec 13, 2016

GCE uses ENS# instead of ETH#. That was the issue.

@jsindy jsindy closed this as completed Dec 13, 2016
@jawj
Copy link
Owner

jawj commented Dec 13, 2016

Ah, thanks.

Were you using the latest version of the script?

It now tries to detect the interface name, like this: ETH0ORSIMILAR=$(ip route get 8.8.8.8 | awk -- '{printf $5}').

So I wonder if this is working correctly ...

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

No branches or pull requests

2 participants