7

I am trying to configure VNC on my server. I found this guide which seems very easy: https://rbgeek.wordpress.com/2012/06/26/how-to-install-vnc-server-on-centos-6/

Lastly, I got to iptables configuration:

when I run this command as exactly as guide told:

sudo iptables -I INPUT 5 -m state --state NEW -m tcp -p tcp -m multiport --dports 5901:5903,6001:6003 -j ACCEPT

I terminal throws this message:

iptables: Index insertion too big

What does it mean? And How can I fix this?

1 Answer 1

15

That means that you're trying to insert the rule at a position that doesn't exist in the table.

In this case -I INPUT 5 tells iptables to insert the rule on position 5 of the INPUT table but the table is shorter than that.

That guide apparently assumes some pre-existing rules that you don't have. I looked at it and it doesn't show what they expect.

It would most likely be OK to simply skip the 5:

sudo iptables -I INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 5901:5903,6001:6003 -j ACCEPT

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .