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

Using the iptables puppet module what syntax to I need to allow port redirection from port 443 to 8443 on the local host?

It looks like it should be the syntax should be the following but I'm not sure how to translate this into a manifest.

iptables -t nat -I OUTPUT -p tcp -d --dport 443 -j REDIRECT --to-ports 8443 

Existing puppet rules:

firewall { '100 tomcat rewrite 443 to 8443':
  table     => 'nat',
  chain     => 'PREROUTING',
  jump      => 'REDIRECT',
  proto     => 'tcp',
  dport     => '443',
  toports   => '8443',

firewall { '100 allow access to tomcat 8443 https':
  proto   => 'tcp',
  state   => ['NEW'],
  dport   => '8443',
  action  => 'accept',
share|improve this question
One thing I don't think I'd trust puppet to do. Firewalls. – Tom O'Connor Dec 27 '12 at 23:54
up vote 1 down vote accepted
firewall {'XXX rule':
 destination => '',
 dport => '443',
 proto => 'tcp',
 chain => 'OUTPUT',
 table => 'nat',
 jump => 'REDIRECT',
 toports => '8443'
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.