473,773 Members | 2,398 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Port Scan - Socket Connect

Hi,

I wrote a chat program and it uses Sockets to connect. There is no
intentional port scan going on, however I am seeing tons of port scans
on that port in our firewall, and it (the firewall) continues to
operate around 35% CPU utilization during peak hours. Is there
anything I should look at to make sure that I am not doing or opening
up any holes?

Apr 21 '06 #1
2 2714
Can you post the code that creates and manages the sockets?

Apr 21 '06 #2
Connect Method:

private SocketWrapper.F riendlySocket _socket;
_socket = new SocketWrapper.F riendlySocket(A ddressFamily.In terNetwork,
SocketType.Stre am, ProtocolType.Tc p);

// Events
_socket.SocketC onnected += new
SocketWrapper.O nSocketConnecte dHandler(Socket Connected);
_socket.DataRec eived += new
SocketWrapper.O nDataReceivedHa ndler(GotData);
_socket.DataSen t += new SocketWrapper.O nDataSentHandle r(SentData);
_socket.Error += new SocketWrapper.O nErrorHandler(E rror);
_socket.SocketD isconnected += new
SocketWrapper.O nSocketDisconne ctedHandler(Dis connected);
string ipAddress = Dns.Resolve(_se rver).AddressLi st[0].ToString();

if (_socket.Connec t(ipAddress, int.Parse(127.0 .0.1), 2))
return true;
else
return false;

Destructor:

~ServerConnecti on()
{
_loggedIn = false;

try
{
if(_socket != null)
{
if(_socket.Conn ected)
SendMessage(0, MessageType.Log out, "");

_socket.Disconn ect();
}
}

Disconnect:

public void Disconnect()
{
try
{
if ( (_socket != null) && (_socket.IsConn ected) )
_socket.Disconn ect();
}
catch
{}
finally
{
_socket = null;
_server = null;
_username = null;
_UserID = 0;
_teamName = null;
_lastError = null;
_parent = null;
}
}

Apr 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3220
by: doh..... | last post by:
I'm working on a windows 98 machine with the latest sun sdk. In summary there are two problems I get with appletviewer 1. The applet tries to open a socket to the wrong port 2. The proxy is ignored. Using appletviewer, I am loading an applet from my local hard disk and trying to connect to an external IP.
2
1563
by: rbt | last post by:
I don't fully understand sockets, I just know enough to be dangerous. The below is not detected by nmap, but is affected by iptables or ipsec. Can anyone explain why that is? s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((ip_param, port_param)) while 1: s.listen(5) I can connect to the socket server and even transmit data so I know it's
3
6067
by: Lee | last post by:
Hi, I'm developing a socket program to connect to Informix database through the ODBC. In here i called my socket program as "tap" . My tap will listen for data from unix through port 1070. After checking of the data, tap will then insert the data to the informix database. I know we can point the tap to one specified port in Informix database through the services file. My question is how should i know to which port my tap program send out...
4
2596
by: eight02645999 | last post by:
hi in python, how do one query a port to see whether it's up or not? thanks
9
43160
by: mBird | last post by:
I wrote a service that listens for broadcast messages from my firewall (UDP snmp trap messages) and parses and puts the data in an database. I'd also like to write an app that is a simple form that can listen in when it runs (so I can see messages in a form as they occur.) So I need the ability to listen to a UDP port with two apps at the same time (the service and my app). But when I do that I get an error:...
3
11352
by: Sells, Fred | last post by:
I'm using MSW XP Pro with Python 2.4 to develop but production will be Linux with Python 2.3. (could upgrade to 2.4 if absolutely necessary) I can also switch to Linux for development if necessary. I am writing some python to replace proprietary software that talks to a timeclock via UDP. The timeclock extracts the sending port from the UDP header and uses that for all response messages.
7
7570
by: Sharon | last post by:
Hi all, I've implemented a TCP server using the Socket async methods. When connecting to the server from 3 instances of hyper terminal, i've noticed that each of the newly created server sockets, uses the same server port. I assumed that a new connection will receive a unique port. If this is the way its suppose to work, is it a performance issue? Is it possible that connections from the same IP will connect on the same server port? I...
0
1434
by: mmcgee00 | last post by:
Hi, Currently, I am trying to get different service banner by connecting to different ports using python (code below). The versions I am working with are python 4.2.1 and fedora core 4. I am trying to reproduce a very small piece of nmap, since nmap has to get a port's banner in order to figure out the version. However, I haven't been entirely successful. *******************************************************
2
1762
by: qvx | last post by:
Hi, I don't have server listening on port 8084 but I can open socket to it (and to many other ports, tested for all<8000) import socket def test(port): af, socktype, proto, canonname, sa = socket.getaddrinfo('localhost', port, socket.AF_INET, socket.SOCK_STREAM)
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10264
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
10106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9914
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
8937
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...
0
5355
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...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.