Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have openSUSE 11.3 installed. I'm using the openSUSE firewall configuration mechanism (/etc/sysconfig/SuSEfirewall2). I have a http server application running on port 8080. I want the http service to be accessible using port 80. I created a redirect rule usign:

FW_REDIRECT="0/0,0/0,tcp,80,8080"

This works fine for every request coming from external. But it doesn't for local requests. (example: wget http://myserver/)

Is there a way how I can tell the firewall to redirect local requests addressed for 80 to port 8080? (using the SUSE firewall configuration file)

share|improve this question
    
change the http server to listen on 80? =) –  mtm Nov 6 '12 at 13:36
    
Running a process which listens on 80 requires root privileges. I avoid running processes as root if I can. –  Eduard Wirch Mar 10 at 13:56

2 Answers 2

up vote 0 down vote accepted

Not that I'm aware of. The openSUSE firewall doesn't get invoked when coming from 'inside' as it were.

share|improve this answer
    
The firewall will be iptables based though and it's definitely capable of applying rules 'inside'. If you can't configure it via SuSefirewall then you could add them manually. –  mtm Mar 12 at 11:37

I'm not a SuSe user so I can't speak for it's firewall config, going by sysadmin1138's answer I assume SuSe might be specifying an interface for the redirect you are adding or only adding the redirect to the FORWARD NAT table which local traffic does not traverse.

To see what SuSe has configured:

sudo iptables -t nat -vnL

To apply the redirect for local traffic from any interface with iptables:

sudo iptables -t nat -A OUTPUT --protocol tcp --destination YO.UR.IP.AD --dport 80 -j REDIRECT --to-port 8080

You would then need to persist this with your SuSe firewall setup or figure out the equivalent SuSe config.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.