i have this iptables and working.
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 0:20 -j REDIRECT --to-port 8080 #bypass SSH
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 23:442 -j REDIRECT --to-port 8080 #bypass SSL
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 444:2082 -j REDIRECT --to-port 8080 #Cpanel SSL
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 2084:2086 -j RE
I am setting up tomcat server on my Centos 5.5 machine. I've been advised to run tomcat on 8080 as non root user and redirect traffic to it from port 80.
I searched and found the following iptables commands for this:# iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT -to-ports 8080
# iptables -I INPUT -p tcp --dport 8080 -j ACCEPTI have a doubt:
Possible Duplicate:
iptables: forward port 80 to port 8080
I'd like to forward port 80 to 8080.
So I tried to edit /etc/syscongfig/iptables:
-A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
But got:
# service iptables restart
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK
I have squide with dansguardian on a laptop and need to have incoming port 80 forwarded to 8080 so that even if the user tries to change the proxy setting it will still go to port 8080.
Hello all, I've set up a virtual machine via VirtualBox (both host/guest are Arch x64) as a small development webserver. The VM is connected via NAT and has ports forwarded to the host for SSH and HTTP.
There are two IPs associated with one physical network interface eth0 and eth0:0.
The following works fine for the first interface:
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
Howerver the same doesn't work for the second interface:
iptables -A PREROUTING -t nat -i eth0:0 -p tcp --dport 80 -j REDIRECT --to-port 8080
Also tried:
iptables -A PREROUTING
Hi,
I want to do a simple port redirect, i.e. whatever comes trough whatever interface on port AAAA will get redirected to port BBBB
I thought that
iptables -t nat -I PREROUTING --source 0/0 --destination 0/0 -p tcp --dport AAAA -j REDIRECT --to-ports BBBB
however it doesn't work, e.g.
nc -v -w2 -z localhost AAAA
gives:
I get the following error when I run my JSP file in Eclipse-Juno with Tomcat v7:
'starting Tomcat v7.0 server at localhost' has encountered a problem.
Port 8080 required by Tomcat v7.0 server at localhost is already in use. The server may already be running in another process, or a system process may be using the port.
I have installed Jenkins and opened port 8080 on Ubuntu 12.04 server but still can't access Jenkins remotely.