Listening on port

Hello,
I have to listen on a port and catch any transportation going in/out to/from it, from any software using it to connect to another computer. An example: If I want a spam filter for my arriving e-mail messages, I want to listen to port 110 (the default for POP3), scan every message arriving, and let only messages that don't meet the filter criteria pass on to the mail agent. How can I do it?
Thanks.

Are you trying to write an application that acts as a proxy, i.e. connects to a Mailserver, retrieves mail, and allows another application (e.g. Mail Client application) to connect on a different port and collect the mail from your new application? This is how a lot of e-mail Anti-virus software works....
....or, are you trying to write a "packet sniffer" type application that intercepts all the traffic on a specific port, without the application that already connects on that port being aware, or needing to be reconfigured? This would be more like the way something like a software firewall works.
If it's the former, it's relatively straightforward, if it's the latter, I would say it's almost impossible in Java. You would need access to the underlying operating system TCP/IP implementation, which you would need to handle through JNI to be able to use in Java, but this would certainly not be a trivial task.
Hope this helps you, if you need more help with the first possibility, post again....
D

Similar Messages

  • I need to modify Postfix to listen to port 587

    Mountain Lion Server OS X 10.8.4
    Running Mail service with Postfix and Dovecot. In production with several mailboxes.
    I need to modify Postfix to listen to port 587. I should be able to telnet to port 587, and finally send mail via 587.
    587 already redirects to 25 via the firewall, but external devices need to visit the internal subnet without modifications to the mail app.
    At this stage I just want to get it working with password authentication.   SSL is a project for another day.
    Here's my understanding of the OS X Postfix config:
    /etc/services file:
    Maps service names to port numbers.  Port 25 is  "smtp" and port 587 is "submission".
    /etc/postfix/master.cf file:
    Loads Postfix preferences. Service configurations for "smtp" and "submission" are listed at the top of the file. Each service configuration can be modified with parameters (-o variable_name_here=value_here).
    I found many discussion boards with instructions for enabling 587. They suggest removing the comment syntax for the existing "submission" line:
    # submission inet n - - n - smtpd
    My server didn't have a comment, the line was already enabled:
    submission inet n - - n - smtpd
    I restarted services and 587 didn't work.
    Then I tried a more direct approach:
    587 inet n - - n - smtpd
    This had no effect.
    After each attempt to enable 587 I test with:
    telnet 127.0.0.1 587
    And I get: Connection Refused
    I used the Server app and turned Mail off and on. This stops and starts Postfix.
    I also used commands to restart Postfix:
    postfix stop
    postfix start
    sudo postfix stop
    sudo postfix start
    postfix reload
    sudo postfix reload
    Nothing opens 587.  Any ideas? Thanks in advance for your insights.
    -SE30Emulation

    @Kraftwerk: You cannot change the TCP port used for SMTP.  Well, technically, you can, but then no other mail servers on the Internet will find and communicate with your mail server.  So... forget that.
    The ISP controls the terms and conditions for the network connection, and particularly controls the network and network access.  There's just no way 'round that either, as the ISP has the network position to implement port blocks and firewalls, and usually the contractual authority to allow or deny access.
    With the proper (static) network connection and proper DNS, there is nothing to struggle with; this stuff works. 
    Which implies your ISP does not offer static connections, or there's an ISP error, or you're attempting to operate a mail server on a dynamic address.  None of this works.
    You might try mailhop service — if that's permitted within the limits of the terms of service — but it'll be easier and cheaper to host your mail elsewhere.  Or to get a static IP address and proper public DNS, if your ISP offers that. 
    SMTP services are also tied to DNS, as well; other mail servers use DNS checks to detect rogue (spam) servers, and a mail server erroneously configured on a dynamic IP address will have mismatched DNS, and other mail servers will detect that and drop mail from and often to that mail server; that server is indistinguishable from a spam engine.
    There's rather more the ISP can do as part of best-practices networking, too.  TCP port 25 connections both inbound and outbound are usually spam engines operating on malware-infested, so it's common to block that traffic to reduce the volume of spam.  Various ISPs will further blacklist dynamic IP address blocks, which means other SMTP servers using these blacklist services will ignore servers in these address ranges.
    Get static IP.  Or host elsewhere.  Or (if permitted) mail hop. 

  • Sql 2008 express not listening on port 1433

    I installed sql 2008 express on 2008R2 but it is not listening on port 1433.
    I check configuration for tcp and enabled that already. also started sql browser service.
    any idea?

    I installed sql 2008 express on 2008R2 but it is not listening on port 1433.
    I check configuration for tcp and enabled that already. also started sql browser service.
    any idea?
    by default SQL Server Express does not enable Remote Connections.
    Could you check the following:
    1) check that the SQL Express is running (SQL Server Configuration Tool)
    2) log onto the box containing the SQL Server and try to connect with SSMS to the SQL Express instance. Try tcp/ip and/or shared memory to connect.
       if you can successfully login check that the SQL Server does allow Remote Connections
    3) Firewall does not block incoming connections
    4) does the DNS server name resolve to the correct ip address of the SQL Server ?

  • POA ist not listening on port 7191

    Hi,
    When installing the mobility service I noticed that POA is not listening on port 7191.
    How can I start this listening ?
    Bye
    Alfons

    Originally Posted by Alfons
    Hi,
    When installing the mobility service I noticed that POA is not listening on port 7191.
    How can I start this listening ?
    Bye
    Alfons
    Take a look here: https://www.novell.com/documentation...nfig_user_soap
    Thomas

  • What's listening on port 454 and 455 in Azure? Warning flagged by security scan

    We are about to go live with an Azure Website and, as a precaution, did a security scan on the IP address that has been allocated to us.
    There were a number of low severity warnings listed which we're not too worried about, however the scan did flag that something appears to be listening on port 454 and 455, and supports TLS1.0.
    RESULTS:
    Available non CBC cipher Server's choice SSL version
    RC4-SHA DES-CBC3-SHA TLSv1
    Does anyone know what this is? I can't find it obviously listed anywhere. If it's not necessary, can I switch it off? And if it is necessary, can I set it to require a more secure protocol?
    We're hosted in the "Australia East" datacentre, in case that's relevant.
    Crossposted to Stack Overflow here:
    http://stackoverflow.com/questions/27807505/whats-listening-on-port-454-and-455-in-azure-warning-flagged-by-security-scan

    Hello Michael,
    These ports are used for internal communication in Azure Websites infrastructure. They are not site specific and you cannot turn them off. It is safe to ignore them.
    Thanks,
    Petr

  • REP-0186: Daemon failed to listen to port Forms Server Not starting

    Hello Team,
    E-Biz 11.5.0.2
    O/S HP-UX B.11.11
    when we are stating the Forms server it is sarting with status 0, but when we check the status it is exiting with the following error
    *08/27/12-17:42:46 :: starting Reports Server for qhrp on port 7074.*
    REP-0186: Daemon failed to listen to port
    *08/27/12-17:42:47 :: adrepctl.sh: exiting with status 0*
    we are not able to see the reports after submitting the requests.Requests are executing successfully.But when clicking on output or log the following message getting appearedon the IE
    An error occurred while attempting to establish an Applications File Server connection with the node FNDFS_HR3D. There may be a network configuration problem, or the TNS listener on node FNDFS_HR3D may not be running. Please contact your system administrator.
    Please advice.
    SRK

    The issue got resolved by restoring the ifile in 8.0.6 ORACLE_HOME..

  • Remote Desktop - not running/no listener on port 3389

    Hello,
    I have a problem with RDS (Remote Desktop) on a Windows 7 machine. It worked fine for the past 2 years.
    Error: The computer can’t connect to the remote computer.
    First I checked some settings:
    RDP enabled (also tried to disable, reboot en then enable)
    Registry: fEnableWinStation (1)
    Firewall is disabled
    RDP / RDS services are running
    Problem:
    RDP/RDS is not listening
    “qwinsta” command: rdp-tcp is not listed
    “netstat –an” command: no listener on port 3389
    (rdp is configured to use the default port, 3389)
    I also checked the “RDP Winstation driver” and the “Remote Desktop Services Security Filter Driver”.
    Statup type: Demand
    Problem: Both are NOT started.
    When I start them manually, or set the startup type to “boot” and then reboot
    the drivers will start, but it makes no difference. Still not listening on 3389.
    Does someone know a solution besides reinstall the OS.
    Thanks.

    Hi,
    Firstly, I would like to check when did this issue happen? Whether you have tried installed some software or updates?
    Meanwhile, please try to perform a
    system restore to check the result.
    Also check the server settings, here is a similar thread:
    Terminal Services/ Remote Desktop not working 
    Hope this helps.
    Vincent Wang
    TechNet Community Support
    Have you tried this?
    Regards
    Vincent Wang
    TechNet Community Support

  • Channel_setup_fwd_listener: cannot listen to port: 1158

    I want to access the Enterprise manager through.
    http://<IP Address>:1158/em/
    Because of firewall issue i used ssh to create the tunnel.
    But i gives an error.
    I do not undestand it very clearly and workaround for that.
    oracle@srv603484:~> ssh -fNL 1158:<IP Address>:1158 oracle@<IP Address>
    Password:
    bind: Address already in use
    channel_setup_fwd_listener: cannot listen to port: 1158
    Could not request local forwarding.
    Please help.
    Thanks,

    It seems this is a ssh tunnel issue. Try this:
    ssh -f user@<IP Address> -L 1158:<IP Address>:1158 -N

  • Error when listening on port 80 for weblogic 6.1 on AIX

    I setup weblogic 6.1 on AIX 4.3. I configured weblogic to listen on port 80. When
    I start weblogic as a non-privilege user(not using root) the weblogic report the
    error as following:
    <Dec 12, 2001 1:31:46 PM CST> <Emergency> <WebLogicServer> <Unable to create a
    s
    erver socket for port: 80. java.net.BindException: The file access permissions
    do not allow the specified action. Perhaps another process is using port 80.>
    But when I login as root, startweblogic didn't report the error.
    Who can help me?
    Thanks.

    Hello,
    Port numbers less than 1024 are only accessible to
    root.
    You may be able to work around this by creating a start script
    owned by root with the setuid bit on. That way your
    non-privilege account could execute the script and
    run the server as root.
    Hope this helps.
    "zhenglee" <[email protected]> wrote:
    >
    I setup weblogic 6.1 on AIX 4.3. I configured weblogic to listen on port
    80. When
    I start weblogic as a non-privilege user(not using root) the weblogic
    report the
    error as following:
    <Dec 12, 2001 1:31:46 PM CST> <Emergency> <WebLogicServer> <Unable to
    create a
    s
    erver socket for port: 80. java.net.BindException: The file access permissions
    do not allow the specified action. Perhaps another process is using port
    80.>
    But when I login as root, startweblogic didn't report the error.
    Who can help me?
    Thanks.

  • Listening a port

    hi all,
    I know that there is no Socket class for j2me,
    but i need to listen a port until i get a call..
    i used to do this by the help of Socket.accept();
    so how can i listen to a port by Connection in j2me. I guess
    one can only open a Connection by Connector.open() and openOutputStream or openInputStream but how can we listen a port??
    its urgent pls answer...

    The standard MIDP1.0 specification does not support socket server. Some manufacturers provide additional support for it, like Siemens (SL45i, M50). See also:
    http://wireless.java.sun.com/midp/questions/rawsocket/
    http://developer.java.sun.com/developer/qow/archive/118/index.html
    Let's see what MIDP2.0 will offer.
    I have the same problem, pushing notification messages from the server to the client. I'm developing some sort of Instant Messaging software. So I'm using a simple Poll method: When active the MIDlet starts a background thread which periodically sends a HTTP request to the server (Timer, TimerTask and Thread are involved). Currently I'm at the early beginning, so I cannot help you that much... :-/

  • Old KMS server still listening on port 1688

    Hi
    I have removed 2008 KMS server key from our old server and also stop publishing it to DNS.
    However, the old server is STILL listening on port 1688.  How can I stop the server from listening on port 1688 (slsvc.exe is the process that is doing it).  I just want the service to stop doing this.
    Thanks

    For the time being I have used the Windows firewall to block port 1688 but that is not exactly what I want to do...
    Are you telling me that after going through the uninstall process; restarting the server will prevent the SLSVC service to listen on port 1688?
    After re-configuring SLSVC/SPPSVC (e.g. to enable as KMShost or disable as KMShost), a restart of the server is recommended.
    I thought from your earlier reply, that you had restarted the server ?
    [because SLSVC/SPPSVC is a running service on all modern Windows machines, and that performs genuine license validation for the machines own license as well as for KMShost operations, it's best to restart the server after making configuration changes to
    that service]
    [it's also good practise to restart a machine after configuration changes, to ensure that the full startup-from-cold-boot routine is correctly configured. this gives confidence that during any subsequent restart of the machine, the machine will auto-start
    all the necessary services and processes without error]
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • Possible to have two tiers listening on port 80 for OAS 10g? -- help

    I would like to have multiple tiers listening on port 80 for my application server. Is this possible?

    2 daemons, both listening on the same port on the same server.... It is not possible, unless:
    1. you have two middle tiers on 1 machine
    2. both middle tiers having the same applications installed
    3. using webcache as loadbalancer
    In any other case: it is just not possible, because the tcp packet knocking at port 80 just doens't know which daemon to choose...

  • Mail Not Listening On Port 25

    Oh joy, another problem with the Mail System. Now mail is not listening on port 25. A port scan on the box shows ftp on port 21, ssh on 22, then jumps to http on port 80. Port 25 is not listed, although the mail server is still sending out mail that's backed up in the queue. How do I get this thing to start listening on 25 again?
    Gary

    Never mind, I found the issue. Parallels. Go figure.

  • IChat File Transfer port issue (can't listen to port 5190 and 7777)

    Greentings ladies and gentlemen,
    I need help opening port 5190 and 7777 for ichat server file transfers. As for now, my situation can be described as below:
    (1)I have a ichat server in a mac mini(2010, newest model as for today) running a fully updated version of MACOSX SERVER 10.6 inside a lab in my university.
    (2)As for the ichat server itself, text, voice, video between 2 or more persons are all working great. As for clients the latest version of ichat and pidgin(text only) are being used. The only problem is the lack of file transfer between ichat clients.
    (3)The server is behind a router (YAMAHA RTX 1200). I am 100% sure that the router is correctly configured to allow packets in and out of the port 5190 and 7777, among the other necessary ports. All the other ports are open and working correctly. I also manually disabled the firewall of a windows7 laptop and tested packet transfers on both ports and both worked fine.
    (4)As I said before, the server is inside my university lab. I made sure that all ports between 1023~65535 are open in the univesity gateway/backbone network.
    Bellow are firewall(IPFW) settings before flushing (tried configuring using both GUI and CUI, and both returned the same results)
    sudo ipfw l
    Password:
    00001 allow udp from any 626 to any dst-port 626
    01000 allow ip from any to any via lo0
    01010 allow udp from any to any dst-port 5190
    01030 allow tcp from any to any dst-port 5190
    12300 allow tcp from any to any established
    12301 allow tcp from any to any out
    12302 allow tcp from any to any dst-port 22
    12302 allow udp from any to any dst-port 22
    12303 allow udp from any to any out keep-state
    12304 allow tcp from any to any dst-port 53 out keep-state
    12304 allow udp from any to any dst-port 53 out keep-state
    12305 allow udp from any to any in frag
    12306 allow tcp from any to any dst-port 311
    12307 allow tcp from any to any dst-port 625
    12308 allow icmp from any to any icmptypes 8
    12309 allow icmp from any to any icmptypes 0
    12310 allow igmp from any to any
    12311 allow tcp from any to any dst-port 5190
    12311 allow udp from any to any dst-port 5190
    12312 allow tcp from any to any dst-port 5222
    12313 allow tcp from any to any dst-port 5223
    12314 allow tcp from any to any dst-port 5269
    12315 allow udp from any to any dst-port 5297,5678
    12316 allow tcp from any to any dst-port 5298
    12316 allow udp from any to any dst-port 5298
    12317 allow udp from any to any dst-port 16384-16403
    12318 allow udp from any to any dst-port 5060
    12319 allow tcp from any to any dst-port 7777
    12320 allow tcp from any to any dst-port 8008
    12321 allow tcp from any to any dst-port 8443
    65535 allow ip from any to any
    And after flushing
    sudo ipfw l
    Password:
    65535 allow ip from any to any
    In either case ports that are being listened are listed below.
    netstat -na | grep LIST
    tcp46 0 0 *.5269 . LISTEN
    tcp46 0 0 *.5223 . LISTEN
    tcp46 0 0 *.5222 . LISTEN
    tcp4 0 0 127.0.0.1.5347 . LISTEN
    tcp46 0 0 *.5900 . LISTEN
    tcp4 0 0 *.88 . LISTEN
    tcp6 0 0 *.88 . LISTEN
    tcp4 0 0 *.311 . LISTEN
    tcp4 0 0 192.168.2.96.53 . LISTEN
    tcp4 0 0 *.3659 . LISTEN
    tcp4 0 0 *.106 . LISTEN
    tcp4 0 0 *.3659 . LISTEN
    tcp4 0 0 *.106 . LISTEN
    tcp4 0 0 127.0.0.1.54 . LISTEN
    tcp4 0 0 127.0.0.1.53 . LISTEN
    tcp4 0 0 *.749 . LISTEN
    tcp4 0 0 *.389 . LISTEN
    tcp6 0 0 *.389 . LISTEN
    tcp4 0 0 *.22 . LISTEN
    tcp6 0 0 *.22 . LISTEN
    tcp4 0 0 *.548 . LISTEN
    tcp6 0 0 *.548 . LISTEN
    tcp4 0 0 *.625 . LISTEN
    tcp4 0 0 127.0.0.1.631 . LISTEN
    tcp6 0 0 ::1.631 . LISTEN
    As you can see my firewall settings are not being reflected on the actual server firewall.
    Is there any way I could just force the server into listening the port?
    If necessary I can post screenshots of every ichat server/firewall configuration tab from the Server Admin GUI.
    Thanks in advance for any help/support.

    First off, realize there is no association between your firewall rules and netstat.
    Just because your firewall is letting traffic in that does not mean it will appear in your netstat.
    netstat -a will show you a list of ports that are in use - i.e. there is some process listening to (or writing to) that port. That is independent of whether the firewall permits the traffic (e.g. the firewall could well allow traffic in on 5190, but unless there's a process listening to 5190 you won't see it in the netstat).
    Secondly, IIRC iChat file transfers are client-to-client therefore it might not be your server, or your server's firewall or your server's network that's the issue - the client will need to have a firewall configured to allow incoming traffic from other iChat clients.
    Does that help shed some light on things? (it isn't clear whether your post is referring to the server or the client side of things).

  • X is listening on port 6000?

    My X server is listening on port 6000 and I simply can't find a good way to stop it from doing so!
    I tried altering multiple config files (the startx script, Xservers script from the kdm configs) and still I have X listening!
    (Of course there is still a firewall blocking reactions on that port)
    Normaly a line like -nolistening tcp has to be added after defining the X server executable. This is a default setting but appearently not on my system.
    What am I doing wrong?

    /usr/X11R6/bin/startx
    I've tried that before. Personaly I think the startx script is ommited whenever you use a graphical login manager like xdm, kdm, gdm etc... .
    Kdm keeps it's config files in "/opt/kde/share/config/kdm/". According to the kde documentation one should alter the lines of the Xservers file. But these should contain the line -nolisten tcp by default. In my case (a fresh kde 3.4 install) the file did'nt so a changed it to:
    # $Xorg: Xserv.ws.cpp,v 1.3 2000/08/17 19:54:17 cpqbld Exp $
    # Xservers file, workstation prototype
    # This file should contain an entry to start the server on the
    # local display; if you have more than one display (not screen),
    # you can add entries to the list (one per line). If you also
    # have some X terminals connected which do not support XDMCP,
    # you can add them here as well. Each X terminal line should
    # look like:
    # XTerminalName:0 foreign
    :0 local@tty1 /usr/X11R6/bin/X -nolisten tcp
    ### Don't change these two lines; they are hints for genkdmconf. ###
    ### Version 1.99 ###
    :1 local reserve /usr/X11R6/bin/X -nolisten tcp :1 vt8
    :2 local reserve /usr/X11R6/bin/X -nolisten tcp :2 vt9
    :3 local reserve /usr/X11R6/bin/X -nolisten tcp :3 vt10
    Still al of this makes no changes to the fact that X keeps listening on the 6000 port.
    And since this can evolve into a security risk I want it to change. Quite odd behaviour really since it's should be ommited as default.

Maybe you are looking for

  • Survey Question - Carry over data

    Hi, Is there a way to carry over responses/answers from a survey question from one slide to another? I have a scenario where users analyze a situation and note the problems (survey answers - ungraded) on one slide. I don't want them to see the answer

  • My contacts are no longer on my laptop

    I have a MacBook, OSX Lion (just installed today), an iPhone 3GS (OS5).  After I synced my phone to my computer, I no longer have any contacts on my computer, but they are still on my phone.  I had "sync all contacts" checked, but it doesn't seem to

  • A Grow Box for a JFrame

    I am this >||< (font size 8) close to getting this JGrowBox class thing to work exactly the way I want it to, and then, everybody can have a nice little grow box thingie to "attatch" to their JFrames. Ooooh. I have three problems. First, if the user

  • The application Skype quit unexpectedly...

    Hopefully I'm not re-asking a settled top[ic - but I didn't find anything searching. The subject line pretty much covers it. I haven't used Skype much and not for a few months now and it used to work fine. Just wanted to revive it the other day so I

  • Loading TaskFlow in a Popup.

    Hi, I am using Jdeveloper version 11.1.1.3.0. I want to Load the TaskFlow in the a popup. TaskFlow2 --> Contains Managed Bean Method (Default activity)-- (SUCCESS) --> App ModuleImpl Method (Parameter -- sending string value in request scope) -------