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 |
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 :) ). |
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 |
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> Ian |
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. |
What kind of game server are you trying to run? Does it show up as running in "ps -e"?
Ian |
LOL damn Im a newbie... Its MOHAA and it wasn't running :newbie: 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 |
:D No problem.
|
Quote:
lol, man, that was the 1st thing i said in the 1st post...the server has to be running. lol You're welcome. |
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.
|
All times are GMT -5. The time now is 08:16 PM. |