I am trying to set up a redirect for 443 to 8443 (non-root app can not use privileged port) using the following:
iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 8443
However, when trying to connect on 443 (via localhost), I am getting a 'connection refused'. 8443 is open and functioning. I assume a 'connection refused' issue precludes response packets being dropped, as that would result in a timeout.
No other rules exist for filter, nat, mangle, or raw.
Distribution information:
# rpm -q iptables
iptables-1.3.5-9.1.el5
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.8 (Tikanga)