How to open custom ports?

Alles, was den Apache betrifft, kann hier besprochen werden.

How to open custom ports?

Postby hkBattousai » 13. April 2010 07:41

Currently open ports are the initial default ports:
The XAMPP default ports:

ftp 21/tcp # File Transfer [Control] (XAMPP: FTP Default Port)
smtp 25/tcp mail # Simple Mail Transfer (XAMPP: SMTP Default Port)
http 80/tcp # World Wide Web HTTP (XAMPP: Apache Default Port)
pop3 110/tcp # Post Office Protocol - Version 3 (XAMPP: POP3 Default Port)
imap 143/tcp # Internet Message Access Protocol (XAMPP: IMAP Default Port)
https 443/tcp # http protocol over TLS/SSL (XAMPP: Apache SSL Port)
mysql 3306/tcp # MySQL (XAMPP: MySQL Default Port)
AJP/1.3 8009 # AJP/1.3 (XAMPP: Tomcat AJP/1.3 Port)
http-alt 8080/tcp # HTTP Alternate (see port 80) (XAMPP: Tomcat Default Port)

I want to make two applications communicate through local host,
One is at 127:0.0.1:4999
The other one is at 127:0.0.1:5001

How can I enable these 4999 and 5001 ports?
User avatar
Posts: 5
Joined: 20. September 2009 20:24

Re: How to open custom ports?

Postby erich.wanker » 19. April 2010 16:00


i think - you mean "Local port forwarding" .... ?

if you have linux (iptables netfilter is
assumed) and want something remote incoming to
port 4999 map unto port 5001:

Code: Select all
iptables -t nat -I PREROUTING --dport 4999 -m
state --state NEW -p tcp --sync -j DNAT --to

You can of course add -s and -d to it to only
accept from certain sources to certain
destinations -i for the incoming interface.
You can change to point to any host on
your network.


Posts: 19
Joined: 11. November 2009 14:46

Return to Apache

Who is online

Users browsing this forum: No registered users and 7 guests