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 have a Plusserver Firewall and need to add two rules to allow me to access an http and https website.

iptables -A OUTPUT -p tcp --dport 80 -d -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p tcp --dport 443 -d -m state --state NEW -j ACCEPT

If i use only one line will work, any of each these but not both in same time.

I restarted the firewall. and nothing.


Later edit: I found the problem. At the end of each line should have an ; close line.

share|improve this question

migrated from Sep 13 '12 at 19:12

This question came from our site for professional and enthusiast programmers.

Thought the fault could be in the --state, can your try this example

iptables -A OUTPUT -p tcp --dport 80 -d -m state --state NEW,ESTABLISHED -j ACCEPT

iptables -A OUTPUT -p tcp --dport 443 -d -m state --state NEW,ESTABLISHED -j ACCEPT

When it doesn't success, you can take a look at this article

share|improve this answer

Your Answer


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