[SOLVED] how to open a port to a single application?

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read this

[SOLVED] how to open a port to a single application?

Postby BozoDel on Sat Feb 09, 2013 1:26 pm

I want to host a game server, so I have to open a port in the firewall, right? But I'm scared of leaving it too wide open. gutf lets me open for some preconfigured applications (like Transmission), or open a specific port (without limiting the access through that port). There's also the possibility of opening not a specific port, but for a specific service... but I have no idea how all those names in /etc/services relate to my situation.
Last edited by BozoDel on Sun Feb 10, 2013 6:45 am, edited 1 time in total.
BozoDel
Level 1
Level 1
 
Posts: 23
Joined: Sun Apr 01, 2012 3:08 pm

Linux Mint is funded by ads and donations.
 

Re: how to open a port to a single application?

Postby xenopeek on Sat Feb 09, 2013 2:00 pm

All the examples you give just open a port (or more than one). If you pick a preconfigured application, it will open the ports needed by that application. If you pick a service, it will open the ports needed by that service. The firewall just discards unsolicited traffic on closed ports, and lets through unsolicited traffic on open ports. If you don't have a (any) program running that is listening on that port, nothing bad happens. You should generally not use a port below 1024 for purpose like game servers, as ports below 1024 are generally reserved for specific services (like port 80 for your web server). You can check which TCP and UDP ports are being listened to with:
Code: Select all
sudo ufw show listening

Pick a port number above 1024, one that isn't shown in that list, and you should be fine with opening that port and running your game server on it. There is also a register of known ports being used by specific programs: http://www.iana.org/assignments/service ... umbers.xml. If you don't have those programs running, you can use their ports.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14561
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: [SOLVED] how to open a port to a single application?

Postby BozoDel on Sun Feb 10, 2013 6:45 am

Thank you, dear!
BozoDel
Level 1
Level 1
 
Posts: 23
Joined: Sun Apr 01, 2012 3:08 pm


Return to Other networking topics

Who is online

Users browsing this forum: No registered users and 6 guests