By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,199 Members | 1,742 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,199 IT Pros & Developers. It's quick & easy.

Listening to a port behind firewall

P: n/a
Hi, I'm programming an IRC bot. I'm trying to establish a dcc
connection with another IRC client. I give the ipaddress and port
number to the client in the request. I listen to that port with
TcpListener on IPAddress.Any. The listener never receives a
connection.

My situation is the bot computer is behind a router. Is there
something special that must be done to bind to the router's port?

Thanks,

Sean.
Nov 16 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
You must enable portforwarding for that specific port on your router. If you
don't packets will most likely arrive at the router and just be dropped.

Yves

"Sean" <um******@hotmail.com> schreef in bericht
news:b7*************************@posting.google.co m...
Hi, I'm programming an IRC bot. I'm trying to establish a dcc
connection with another IRC client. I give the ipaddress and port
number to the client in the request. I listen to that port with
TcpListener on IPAddress.Any. The listener never receives a
connection.

My situation is the bot computer is behind a router. Is there
something special that must be done to bind to the router's port?

Thanks,

Sean.

Nov 16 '05 #2

P: n/a
How is it then that MIRC on that same computer can initiate and accept
DCC requests? I'm just trying to do the same thing as MIRC with
regards to DCC CHAT.
"phoenix" <pa******@skynetWORK.be> wrote in message news:<ue**************@TK2MSFTNGP11.phx.gbl>...
You must enable portforwarding for that specific port on your router. If you
don't packets will most likely arrive at the router and just be dropped.

Yves

"Sean" <um******@hotmail.com> schreef in bericht
news:b7*************************@posting.google.co m...
Hi, I'm programming an IRC bot. I'm trying to establish a dcc
connection with another IRC client. I give the ipaddress and port
number to the client in the request. I listen to that port with
TcpListener on IPAddress.Any. The listener never receives a
connection.

My situation is the bot computer is behind a router. Is there
something special that must be done to bind to the router's port?

Thanks,

Sean.

Nov 16 '05 #3

P: n/a
phoenix wrote:
"Sean" <um******@hotmail.com> schreef in bericht
news:b7*************************@posting.google.co m...
Hi, I'm programming an IRC bot. I'm trying to establish a dcc
connection with another IRC client. I give the ipaddress and port
number to the client in the request. I listen to that port with
TcpListener on IPAddress.Any. The listener never receives a
connection.

My situation is the bot computer is behind a router. Is there
something special that must be done to bind to the router's port?


If it's a router, and there is no network address translation occuring,
then the packet should just end up in the right spot. You might find it
useful to run a packet sniffer on the Internet side of the router to
diagnose this. Ethereal is very nice (http://www.ethereal.com)
You must enable portforwarding for that specific port on your router. If you
don't packets will most likely arrive at the router and just be dropped.


If you have network address translation happening, or the router is a
firewall, then this is correct. Some of the nicer firewalls will do
connection tracking to make this work transparently.

Cheers,
Mikal
Nov 16 '05 #4

P: n/a
Bah, I don't quite get this yet. MIRC can initiate and accept dcc
requests behind the firewall just find.

Thanks for the sniffer link.

I tried it out, but can't seem to put it all together yet.

MIRC sends 2 requests through irc: 1) notice message, 2) privmsg. Both
are pointing to the ip of the cable modem and the same port. Then the
irc initiater sends an accept after accept is clicked, and the MIRC
sends an ack back.

Michael Still <mi***@stillhq.com> wrote in message news:<40******@news.comindico.com.au>...
phoenix wrote:
> "Sean" <um******@hotmail.com> schreef in bericht
> news:b7*************************@posting.google.co m...

Hi, I'm programming an IRC bot. I'm trying to establish a dcc
connection with another IRC client. I give the ipaddress and port
number to the client in the request. I listen to that port with
TcpListener on IPAddress.Any. The listener never receives a
connection.

My situation is the bot computer is behind a router. Is there
something special that must be done to bind to the router's port?


If it's a router, and there is no network address translation occuring,
then the packet should just end up in the right spot. You might find it
useful to run a packet sniffer on the Internet side of the router to
diagnose this. Ethereal is very nice (http://www.ethereal.com)
You must enable portforwarding for that specific port on your router. If you
don't packets will most likely arrive at the router and just be dropped.


If you have network address translation happening, or the router is a
firewall, then this is correct. Some of the nicer firewalls will do
connection tracking to make this work transparently.

Cheers,
Mikal

Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.