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 args given in wrong order #43

Open
davidkarlsen opened this issue Apr 23, 2014 · 4 comments
Open

iptables args given in wrong order #43

davidkarlsen opened this issue Apr 23, 2014 · 4 comments

Comments

@davidkarlsen
Copy link

state declaration:
iptables.insert:
- table: filter
- chain: INPUT
- position: 1
- protocol: tcp
- dport: 22
- match: state
- connstate: NEW,ESTABLISHED
- jump: ACCEPT
- save: True

Fails with:
Function: iptables.insert
Result: False
Comment: Failed to set iptables rule for openssh.
Attempted rule was iptables -t filter -I INPUT 1 -m state --state NEW,ESTABLISHED --dport 22 --protocol tcp --jump ACCEPT
Changes:

The generated command line should give --protocol before --dport, e.g.
tables -t filter -I INPUT 1 -m state --state NEW,ESTABLISHED --protocol tcp --dport 22 --jump ACCEPT would work.

@techhat
Copy link
Contributor

techhat commented Apr 23, 2014

Thanks for the report, @davidkarlsen. What version of Salt are you running?

@davidkarlsen
Copy link
Author

Hm, it seems the param should be proto and not protocol - so closing (at least it works correctly if I use proto instead)

@techhat
Copy link
Contributor

techhat commented Apr 23, 2014

Ah, that would do it.

@davidkarlsen
Copy link
Author

salt-minion --version
salt-minion 2014.1.3

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