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

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

1 Answer 1

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.