Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How can I open specific ports for my apache server under linux? I'm trying to build a connection with a online game that sends messages and receives to a specific port. I want to make my apache server/linux machine to listen to that specific port. bottom line, being able to receive/send data from/to that port

share|improve this question
2  
Is this about allowing incoming connections to specific ports Apache is already listening to or are you asking about configuring Apache to listen on specific ports? Please provide information when asking questions - in its current state your question is too vague. –  Marcin Kaminski Dec 1 '12 at 22:27
    
I changed the question. Hope it's clearer now. ty –  Deus Deceit Dec 1 '12 at 22:41
add comment

1 Answer

up vote 0 down vote accepted

You can take a look at binding Apache to specific ports here.

I assume you're aware that you don't normally choose the port from which you're sending data, unless this is in a response to an already established connection.

For example, to make the server accept connections on both port 80 and port 8000, on all interfaces, use:

Listen 80
Listen 8000

To make the server accept connections on port 80 for one interface, and port 8000 on another, use

Listen 192.0.2.1:80
Listen 192.0.2.5:8000
share|improve this answer
add comment

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.