Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to add a second port for c2s connections to my existing jabberd2. Unfortunately, it wasn't as simple as adding another <port> element to c2s.xml. Can one instance of c2s listen on multiple ports or will I need to add a whole second c2s instance?

If I do need another instance of c2s, resources for setting that up would be very appreciated. Documentation for that scenario seems pretty sparse and mostly restricted to multiple-domain setups, whereas I want connections to either port to be identical in every other respect.

share|improve this question
up vote 2 down vote accepted

Use port forwarding to forward connections to one port to another port.

i.e. on Linux:

iptables -t nat -A PREROUTING -p tcp --dport 1234 -j REDIRECT --to-port 5222
share|improve this answer
This is similar to the workaround I have in place for now. My router is forwarding both ports to the one port on the jabber server. I'm still hoping for a way to do it in jabberd2, but I'm not sure the hassle of multiple c2s instances is worth it. – Simon Dec 8 '11 at 22:11

Your Answer


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.