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

For an example, I have two authorized client computers, and My server running iptables is and my firewalled web server is When one of the authorized client IPs connects to on port 80, I would like the connection to be forwarded to on port 8888. If any other IP attempts to connect I would like it to refuse/drop the connection. What iptables config would accomplish this? Is there something more specific out there that would be better suited for this job?

share|improve this question

The forwarding can be done with DNAT. Just give a specific source address, and let the others be rejected/dropped as normal.

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.