Hi,
I'm trying to get a minimal installation of Fedora Core 3 (no Xwindows) to work with the installed redhat firewall and tomcat (as a non-root user).
Basically... I need the iptables config file to redirect port 80 to port 8080.
After searching on the net... the following commands don't seem to work:
Code:
iptables -t nat -A PREROUTING -d your hostname -p tcp --dport 80 -j REDIRECT --to-ports 8080
nor
Code:
iptables -t nat -I PREROUTING --src 0/0 --dst yourip -p tcp --dport 80 -j REDIRECT --to-ports 8080
(of course I have the correct hostname or ip addresses in those commands).
My iptables config file in /etc/sysconfig is:
Code:
#Firewall configuration written by system-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
Any info on how to get port 80 to redirect to 8080 (preferably in th iptables config) and work with the standard firewall being operational, would be greately appreciated.
Thanks.