Friday, July 21, 2017

linux - iptables block port range with single port exception

I`ve two rules. First blocked all port from range:




-A INPUT -m state --state NEW -m tcp -p tcp --match multiport --dports 200:65535 -j DROP





and second open one in this range:




-A INPUT -i eth0 -p tcp --dport 5901 -m state --state NEW,ESTABLISHED -j ACCEPT




but it doesn`t work. Anyone know why?

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...