LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 06-06-2003, 01:41 AM   #1
Dirt
Member
 
Registered: Feb 2002
Location: St. Louis
Distribution: Red Hat 8.0
Posts: 30

Rep: Reputation: 15
How do I open up a UDP port?


I am new to Linux infact I just loaded it today and I am setting up a game server that like to use port 12300 (udp). I have some background in it cuz my frinds use it but not much.

I do a nmap and there is no udp running what do I do?

Thanks
 
Old 06-06-2003, 03:28 AM   #2
Robert0380
Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
well 1st off the server has to be running to have the port open. Secondly, if you
have a firewall up that's doing some blocking, you will need what are called
iptables rules. For your case 1 rule will do just fine:

iptables -A INPUT -p udp --destination-port 12300 -j ACCEPT

just typing that in a console will only be good up to the next time you reboot your machine. For now i guess you could just drop that line in rc.local ( /etc/rc.local) and it will run every time you reboot. But you will really want to create a nice set of firewall rules. Look into getting firestarter. It has a GUI approach to the whole thing that makes it easier if you are new
to the game.


iptables is the name of the program, -A means Append a new rule, INPUT is the name of the table, -p means "match the following protoocl" the --destination-port....self explanitory (can be abbreviated --dport) -j means "jump to" and ACCEPT means, pass it on to the recieving application if t there is one.

if the last part said DROP then the packet would get drop kicked off the machine.

iptables is VERY VERY flexible, you can use it to do routing rules and all
that good stuff too. I suggest you get to know them, especially if you plan
on using your Linux box to host servers of any kind.

Welcome to Linux and LQ, you will like it here as there are many helpful
people in this forum (i like to think im one of em ).

Last edited by Robert0380; 06-06-2003 at 03:32 AM.
 
Old 06-06-2003, 01:42 PM   #3
Dirt
Member
 
Registered: Feb 2002
Location: St. Louis
Distribution: Red Hat 8.0
Posts: 30

Original Poster
Rep: Reputation: 15
Thanks for the reply its still not showing up. Heres what I have.

Interesting ports on localhost.localdomain (127.0.0.1):
(The 1594 ports scanned but not shown below are in state: closed)
Port State Service
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
80/tcp open http
111/tcp open sunrpc
443/tcp open https
6000/tcp open X11

but no UDP. Do I have to activate it somehow like I did VSFTPD? I looked in the services and there is TIME-UDP ECHO-UDP DATE-UDP don't know which one it would be none are started.

Thanks Again,
Dirt
 
Old 06-06-2003, 01:49 PM   #4
green_dragon37
Member
 
Registered: Oct 2002
Location: Lower Alabama
Distribution: Slackware, OpenBSD 3.9
Posts: 344

Rep: Reputation: 31
By default, nmap only searches a handful of TCP ports. to make it search UDP, you must be root and run it as so:
Code:
nmap -sU -p 12300 <host name or IP>
then it will scan only UDP port 12300, and hopefully give you the results you are looking for.

Ian

Last edited by green_dragon37; 06-06-2003 at 01:51 PM.
 
Old 06-06-2003, 02:07 PM   #5
Dirt
Member
 
Registered: Feb 2002
Location: St. Louis
Distribution: Red Hat 8.0
Posts: 30

Original Poster
Rep: Reputation: 15
Thanks, I just tried it and its still not open. Im sure Im over looking something really simple like forgetting to turn something on first because I am a super NEWBIE.

Starting nmap V. 3.00 ( www.insecure.org/nmap/ )
The 1 scanned port on (127.0.0.1) is: closed

Thanks for all your great help.
 
Old 06-06-2003, 02:15 PM   #6
green_dragon37
Member
 
Registered: Oct 2002
Location: Lower Alabama
Distribution: Slackware, OpenBSD 3.9
Posts: 344

Rep: Reputation: 31
What kind of game server are you trying to run? Does it show up as running in "ps -e"?

Ian
 
Old 06-06-2003, 02:26 PM   #7
Dirt
Member
 
Registered: Feb 2002
Location: St. Louis
Distribution: Red Hat 8.0
Posts: 30

Original Poster
Rep: Reputation: 15
LOL damn Im a newbie... Its MOHAA and it wasn't running I just ran the server and did a port scan and there it is.... Now I feel stupid. Sorry about that, I guess that iptables thing did work... Sorry about that.

Thanks green_dragon and Robert0380!! You guys rock!!
Dirt
 
Old 06-06-2003, 02:30 PM   #8
green_dragon37
Member
 
Registered: Oct 2002
Location: Lower Alabama
Distribution: Slackware, OpenBSD 3.9
Posts: 344

Rep: Reputation: 31
No problem.
 
Old 06-06-2003, 05:48 PM   #9
Robert0380
Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
Quote:
Originally posted by Dirt
LOL damn Im a newbie... Its MOHAA and it wasn't running I just ran the server and did a port scan and there it is.

lol, man, that was the 1st thing i said in the 1st post...the server has to be running. lol


You're welcome.
 
Old 06-06-2003, 05:50 PM   #10
Robert0380
Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
if you are new to Linux, you may wanna turn off a lot of those services you have running (ftp, smtp, http) if you arent using them. and make sure you get a firewall up.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
telneting to a udp port. juanb Linux - Security 3 03-06-2013 01:30 PM
799 udp port open ddaas Linux - Security 4 07-13-2005 05:33 PM
Wandering, high, open UDP port detected by nmap conn-fused Linux - Security 1 05-15-2005 06:23 AM
TCP Port 53 Open - How to enable UDP 53? stardotstar Linux - Networking 6 03-16-2005 04:49 AM
closing port 68/udp? antik Linux - Security 1 09-26-2003 12:26 PM


All times are GMT -5. The time now is 08:10 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration