Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to block access to the gateway ( on port 80, to prevent network user from trying to access the router setup. I'm using Ubuntu 9.10

share|improve this question

1 Answer 1

up vote 1 down vote accepted
iptables -A INPUT -j DROP -p tcp --to-destination -i eth0

Change --to-destination to the IP address of the gateway.

Change -i eth0 to the interface that you need the rule on.

Note that this will completely block all access to that IP/port combination unless you create a specific rule to allow traffic from one IP, like perhaps an administrative workstation.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.