arno-iptables-firewall / aif

GNU General Public License v2.0
151 stars 24 forks source link

Opening ports #47

Closed campones closed 5 years ago

campones commented 6 years ago

I have an issue while setting it up

Which TCP ports do you want to allow from the internet? (eg. 22=SSH, 80=HTTP, etc.) (comma separate multiple ports)? 20,21,22,80,443,1935,8080,10000,10051,10050

then I get

Allowing ANYHOST for TCP port(s): 20,21,22,80,443,1935,8080.10000,10050,10051 /sbin/iptables -A EXT_INPUT_CHAIN -i + -d 0/0 -p tcp --dport 8080.10000 -j ACCEPT ERROR (2): iptables v1.6.0: invalid port/service8080.10000' specified Try iptables -h' or 'iptables --help' for more information. /sbin/ip6tables -A EXT_INPUT_CHAIN -i + -d 0/0 -p tcp --dport 8080.10000 -j ACCEPT ERROR (2): ip6tables v1.6.0: invalid port/service8080.10000' specified Try ip6tables -h' or 'ip6tables --help' for more information.

I don't know why the comma is translated to a point. As a result I cannot access webmin

208aa943395fbbf07864d37529867b15

abelbeck commented 6 years ago

I tried as a test:

OPEN_TCP="20,21,22,80,443,1935,8080,10000,10051,10050"
OPEN_UDP="20,21,22,53,80,1234"

And it worked fine:

 Allowing ANYHOST for TCP port(s): 20,21,22,80,443,1935,8080,10000,10051,10050
 Allowing ANYHOST for UDP port(s): 20,21,22,53,80,1234

I would look for stray control or multi-byte characters where the comma should be.

campones commented 6 years ago

I didnt edit the conf file directly, I used the configuration wizard in the terminal

abelbeck commented 6 years ago

I would suggest you edit the conf file directly to fix your issue.

campones commented 6 years ago

it's weird, I did once again the wizard and this time it worked.