473,779 Members | 2,015 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Listening to a port behind firewall

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
4 2414
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******@hotma il.com> schreef in bericht
news:b7******** *************** **@posting.goog le.com...
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
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******@skyne tWORK.be> wrote in message news:<ue******* *******@TK2MSFT NGP11.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******@hotma il.com> schreef in bericht
news:b7******** *************** **@posting.goog le.com...
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
phoenix wrote:
"Sean" <um******@hotma il.com> schreef in bericht
news:b7******** *************** **@posting.goog le.com...
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
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******@hotma il.com> schreef in bericht
> news:b7******** *************** **@posting.goog le.com...

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3138
by: 127.0.0.1 | last post by:
How does one go about creating a listening socket in a PHP script. I'm trying to work out a way of finding out my IP address (dynamic, behind NAT) and I can't use the normal http idea to get it (due to stuff proxy by ISP). SO what I thought was to write a protected PHP script which listend for ONE request on that port - and send back the IP bound on that port. So from my linux box I would:
6
9969
by: Ann | last post by:
Hi I have a question regarding the SQL Server(SQL Server 7) port 1433. Some body is trying to hack into our Windows 2000 server through port 1433. Is there a way i can close this port? I tried using a tool called Ipsecpol.exe ( Internet Protocol Security Policies Tool). But when we run netstat, it still looks like they are able to connect to the server using port 1433. Has anyone come across this problem? I would appreciate it very much...
3
2011
by: Laszlo Csabi | last post by:
Hi guys, What I would like to achieve is create a client-server messenger application. The problem I run into is : I have created a listener socket on the client and connect to the remote server ( with a another socket ) to login also tell the server what IP and PORT address the client is listening on, but the IP address an internal IP and not my public IP address because I'm behind a router. Is there any way I could connect to the...
5
9997
by: lazydb2dba | last post by:
I would like to know if there is any reason that a connection port is not listening. I've found the following message in my db2diag.log DIA3003E Error encountered in "TCPIP" protocol support. Return code from "sqleGetAgent" was "-6036". Other findings are: 1. The result of "netstat -an|grep LISTEN" doesn't show the connection
1
4340
by: Ina Schmitz | last post by:
hi newsgroup, I'd like to connect to a remote DB2 Database V 8.2 using the "DB2 Steuerzentrale" (I guess it's called something like "DB2 management console" in the English version). Since the database host is behind a firewall I tried to communicate through ssh port forwarding. Therefore, I run: ssh -L 6789:remotename:6789 -L 50000:remotename:50000 -L 50001:remotename:50001 -L 523:remotename:523 remotename
6
4305
by: John J. Hughes II | last post by:
My code starts a TCP/IP socket listener and waits for incoming connections. This works fine on my system and my test system but I have a customer who say it does not work on their system. As far as I can tell the problem is they are using a DSL modem with a router internal to it. So basically my software is listening to IP address 10.0.0.3 but the external connection is trying to connect to xx.xx.xx.xx on the internet which in concept...
6
3125
by: kai | last post by:
Hi, I was tring to run an example (HelloWorld.aspx) from MSPrss book, I get this message: "ASP.NET Development Server faild to start listening port 1034. Error message: An attempt was made to access a socket in a way fobidden by its access permissions."
25
3630
by: bmearns | last post by:
Is it possible to specify which port to use as the outbound port on a connection? I have the IP address and port number for the computer I'm trying to connect to (not listening for), but it's expecting my connection on a certain port. Specifically, I'm trying to write an FTP host, and I'm trying to implement the PORT command. From everything I've read, the client supplies the IP address and port number for where I'm supposed to connect...
3
1641
by: Piotrekk | last post by:
Hi I have a problem with my server which is not visible after netstat -na command. 1. remote class library compiled to dll and registered to GAC namespace RemoteClass { public class Mathematica : MarshalByRefObject
0
9471
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10302
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9925
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8958
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7478
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6723
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4036
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3631
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.