Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i write a rcon program and i have a problem with external connections.
When i connect to my local server then everything works fine but when i try connect to external server i don't have any response.
Can somebody explain me that ? it is problem with my router or my program is blocked by firewall or something ? i am using this rcon class :
Send RCON Commands to Quake Based Games[^]

and why it only works on my local network ? pls help! thx
Posted
Updated 11-Dec-10 17:54pm
v2
Comments
Abdul Quader Mamun 11-Dec-10 23:54pm    
Spelling check.

It could be a number of things, and you've already named the first two that come to mind. Both the firewall (if you have one enabled) and your router could be blocking the external connection. Most will allow HTTP, FTP, SMTP, and POP3 traffic to external hosts, but they very often block everything else as a default setting. We'll need a lot more information before we can help. What protocol is your program using? What ports? I see that the RCON class uses UDP; is that enabled in your router? What rules are in your firewall and router? In what order do they appear?

Start by checking your firewall - shut it down temporarily and repeat your test. If that doesn't solve it, move to the router and check the rules installed. You may have to add a rule to allow UDP packets on whatever port you're using at the IP address of the target game server. Remember that you have to enable two rules for each socket - one to allow outbound traffic, and one to receive the response. If disabling the firewall in your computer solved the problem, look at the rules it has implemented, and add rules to allow your controller to work.

Add a bit to your question - I think you're on the right track, but we need more info.
 
Share this answer
 
Comments
Sandeep Mewara 12-Dec-10 2:04am    
Comment from OP:
What protocol is your program using? : UDP, SocketType Dgram.
What ports? : TCP/UDP 1234
I try shut down firewall, forwards ports and this doesn't help
Can you try this rcon class on your computer ? and tell me if its works becasue it can be something wrong with my routher. so pls use this rcon class and tell me if its working on your computer pls.

IP Addres : 194.97.164.166
Port : 1234
Password : esl
Command : status
Roger Wright 12-Dec-10 11:09am    
It failed:
System.Net.Sockets.SocketException was unhandled
Message="An existing connection was forcibly closed by the remote host"
Source="System"
ErrorCode=10054
NativeErrorCode=10054

It looks like the remote host doesn't like the password, or remote connections in general.
So how i can fix that ? i need to add some aditional function or something ? sory for that kind of questions but i am beginer in programing
 
Share this answer
 
ok the problem was with the protocol because it sends five bytes instead of four, now everything is ok post to delete
 
Share this answer
 
Comments
Roger Wright 16-Dec-10 1:25am    
Just for my education, what did you change the protocol to? What worked? Was it in the RCON code, or yours?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900