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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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.