Jump to content

REdirect port 80 not working


kaosx

Recommended Posts

Ok so i have tcadminv2 installed on my VPS, and i cannot get port 80 redirect working

 

When i login to putt as root and put the folloing,

 

iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to- port 8880

 

I get this

 

iptables: No chain/target/match by that name.

 

And if i type Service in front i get this

 

service iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to- port 8880

Usage: iptables {start|stop|restart|condrestart|status|panic|save}

[xxx@venus ~]# service iptables save

iptables: Saving firewall rules to /etc/sysconfig/iptables: /etc/init.d/iptables: line 268: restorecon: command not found

[FAILED]

 

 

Any ideas guys?

 

Thanks

 

 

EDIT//

 

Well i tried it with cpanel install and it worked first shot, But it will not work without cpanel installed

 

this is my iptables-save file after following the redirect

 

service iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to- port 8880

-A INPUT -j acctboth 
-A OUTPUT -j acctboth 
-A acctboth -s 119.252.191.xxx -i ! lo -p tcp -m tcp --dport 80 
-A acctboth -d 119.252.191.xxx -i ! lo -p tcp -m tcp --sport 80 
-A acctboth -s 119.252.191.xxx -i ! lo -p tcp -m tcp --dport 25 
-A acctboth -d 119.252.191.xxx -i ! lo -p tcp -m tcp --sport 25 
-A acctboth -s 119.252.191.xxx -i ! lo -p tcp -m tcp --dport 110 
-A acctboth -d 119.252.191.xxx -i ! lo -p tcp -m tcp --sport 110 
-A acctboth -s 119.252.191.xxx -i ! lo -p icmp 
-A acctboth -d 119.252.191.xxx -i ! lo -p icmp 
-A acctboth -s 119.252.191.xxx -i ! lo -p tcp 
-A acctboth -d 119.252.191.xxx -i ! lo -p tcp 
-A acctboth -s 119.252.191.xxx -i ! lo -p udp 
-A acctboth -d 119.252.191.xxx-i ! lo -p udp 
-A acctboth -s 119.252.191.xxx -i ! lo 
-A acctboth -d 119.252.191.xxx -i ! lo 
-A acctboth -i ! lo

Edited by kaosx
Link to comment
Share on other sites

Yeah i have fixed that, Error but redirecting dont work

 

Seems iam missing some moduels with being on VPS

 

restorecon is provided by policycoreutils package. You can try uninstalling and re-installing policycoreutils package and see if you get restorecon file under /sbin

 

 

EDIT

 

Do you know how to get by this one?

 

iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to-port 8880

iptables: No chain/target/match by that name

Edited by kaosx
Link to comment
Share on other sites

Well looks i cant do it at all becuase openvz kernal dont support some iptables and of cource one would be the redirect,

 

So ill have to install tcadmin on 1 box and remote connect the DB to my cpanel server.

Link to comment
Share on other sites

Folks,

 

Have any of you had any experience with mod_mono? I personally haven't and would like to have apache handle the tca frontend, so that I can use proper subdomains, mod_rewrite, .htaccess, etc without having to deviate too far from a conventional LAMP setup.

 

I do really like TCA2 and I'm sure there is nothing wrong with the .Net stuff in general, but it is aimed at windows OS and I simply don't have the time or sufficient interest to learn/mess-with .Net as I will never have to look at it for anything else in my life. I hope maybe mod_mono mentioned above could provide a way of bridging .Net to apache so we are not stuck with this port:8880 nonsense - And NO iptables really is not the way. Maybe there are simple ways to achive what i'm after with Mono/.Net but I am not familiar and will not be drawn in to it as I am a client and not a Dev.

 

Dev team, you have what is shaping up to be a very nice product in TCAv2, please keep up the good work and bear in mind that much of the point of developing a v2 was to have it cross-platform from what I have read in this forum. I do hope you may be able to contribute to this thread.

 

Best,

 

Evil

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use