Tuesday, June 5, 2012

How do I redirect port 80 to 8080

I have a Solaris 10 box. How do i redirect port 80 to 8080, so that trafic comming to port 80 owner will go to port 8080? 

I will appreciate URGET reply 




why do not set your service to listen to port 80? And what kind of service 
is?


I can't say I've done this on Solaris myself but, I think in 
/etc/ipf/ipf.conf you need a line like:- 

rdr ce0 your.ip.add.here 80 -> your.ip.add.there 8080 

You also need to ensure your firewall has sufficient configuration for 
normal operation (if it doesn't currently have a firewall config then 
ensure that is non-blocking otherwise you might lock yourself out!). 

Look into IPF firewall rules, theyre the same for Solaris, AIX, and 
*BSD. 
possibly one which isn't running as root and isn't using suexec 
May be u should try this out................. 

Edit he /etc/ipf/ipf.conf 

pass in quick on <Interface> from any to any port€ keep state 
pass in quick on <Interface> from any to any port€80 keep state 
pass out quick from <IP (or) Hostname> port€80 to any keep state 

or 

Edit /etc/ipf/ipnat.conf 

rdr <Interface> <hostname or IP> port 80 -> <hostname or IP> port 8080 tcp
Sorry for the wrong symbols 

Just follow as below: 

Edit he /etc/ipf/ipf.conf 

pass in quick on <Interface> from any to any port = 80 keep state 
pass in quick on <Interface> from any to any port = 8080 keep state 
pass out quick from <IP (or) Hostname> port = 80 to any keep state 

(or) 

Edit /etc/ipf/ipnat.conf 

rdr <Interface> <hostname or IP> port 80 -> <hostname or IP> port 8080 tcp
The Application owner was a little silent on the nature of the Application but from my checks am certain that Apache runs on the box
And my humble opinion is: in this case port redirect make no sense. 
Especially apache is very easy to be reconfigured to listen on additional 
If its apache is it not just a case of editing the httpd.conf file to listen on port 8080 (or alter it from 8080 to 80 if that is what is actually required) - I assume the requests are coming in against port 8080

0 comments:

Post a Comment

 
Design by BABU | Dedicated to grandfather | welcome to BABU-UNIX-FORUM