1

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 127.0.0.1 --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',
}
1
  • 1
    One thing I don't think I'd trust puppet to do. Firewalls. Dec 27, 2012 at 23:54

1 Answer 1

1
firewall {'XXX rule':
 destination => '127.0.0.1',
 dport => '443',
 proto => 'tcp',
 chain => 'OUTPUT',
 table => 'nat',
 jump => 'REDIRECT',
 toports => '8443'
 }

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .