MSDTC.exe listening on port 5357 but DCOM port range restricted to 5000-5020 - msdtc

I've been having problems trying to get DTCPing.exe to work between 2 servers. I read this article and tried to troubleshoot the issue.
One of the suggestions to to run netstat -anob to determine what port DTCPIng.exe or msdtc.exe was listening on. When I run the command it says it's listening on port 5357, even though I have restricted the DCOM port range to 5000-5020 on both machines. (I have rebooted both machines, and my system admin says the firewall is open bidirectionally for ports 135, and the range 5000-5020)
Am I missing something? Shouldn't msdtc.exe be listening between the DCOM port range and not on port 5357?

Solved it. The port ranges were being exhausted as quite a few RPC calls were taking place. We increased the DCOM port range to 5000-5300 and that then started to work. However every server that participates in the DTC transaction would need identical port ranges and the firewall's would also need to allow the ranges bidirectionally.

Related

How to set 3306 port free after uninstalling MySQL?

I just uninstalled MySQL server, restarted my laptop and reinstalled MySQL server on Windows 8.1.
When I tried to configure it, it said "Port 3306 is already in use" (or something). I know I can use another port number, but I wanted to know how to set 3306 port free and use it.
Actually the port should not be in use anymore.
Did you try out who uses that port? try netstat -ao. Will return you a list of opened ports plus the process id of the program that uses that. You can check which program it is in Task Manager.
Obviously there must be some process binding to the port.
Have a look at this answer on a similar topic to find out which process it is:
https://stackoverflow.com/questions/48198/how-can-you-find-out-which-process-is-listening-on-a-port-on-windows
Once you have the info in hand you can deal with the process - whether it is a remainder of the old mysql installation or something else.

Google Compute VM hacked, now what?

I've been running my Google Compute VM for literally 1 day, and I was hacked, by this IP: http://www.infobyip.com/ip-121.8.187.25.html
I'm trying to understand what I can do next (user connected via ssh, root password was changed), to avoid these types of attacks (and to understand more than what /var/log/auth.log is telling me) ?
I assume you deleted the instance already, right ? from Developers console.
As suggested, always use ssh rsa keys to connect to your instance, instead of passwords. Additionally, depending on where you want access from, you can only allow certain IPs through the firewall. Configuring the firewall along with iptables, gives you better security.
You may also want to take a look at sshguard. Sshguard will add iptables rules automatically when it detects a number of failed connection attempts.
Just to make sure, please change the default port 22 in /etc/ssh/sshd_config to something else.

How to set mysql_protocol_tcp in Objective C Mysql client

I downloaded Karl Kraft's MySQL source and libraries and built a mysql client lib for iOS 6. It worked beautifully the very first time on the local mysql database. Even handled blob data nicely.
The next step was to port forward to a remote database. After downloading various libraries and tearing out my hair, I went looking for a packaged solution.
I downloaded Chilkat's SSH Tunnel library (free 30 day trial -- and $149 -- worth it all). That worked the first time too. It was a pleasure after days and daze of not building, not linking, not compiling, not finding symbols for i386 blah blah blah!!
OK, so here is the kicker. I now want to work with a remote database. When I did the 3306 ssh port forward through ssh port 22 to 3306 on a database machine behind the firewall. Now I turn off mysqld, and my host is localhost port 3306. I have a slight problem with mysql.
The default start of the client on a UNIX/MAC machine is looking for a socket connection on localhost.
I get the following error:
Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)
I need a TCP protocol start option for mysql. With a command line, it is easy --protocol=TCP.
With the iOS client lib, it is not readily apparent. I did a search and in the mysql.h we have the mysql_protocol_type and the constants MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP etc etc.
The missing knowledge that I have, is how to set the option programatically in Objective C.
There is a server object that just defines the parameters (server, name, ports, username, password) and the next object is a connection object that calls mysql_init(). Does anyone have any clues on how to do this?
BTW: Karl Kraft and the guy from ChilKat should have their blood preserved for posterity. They saved me a lot of time.
Thanks in advance.
Took me a while to figure this out. With the MySQL client, if you specify connection to 'localhost', it tries to connect with a UNIX socket at either /tmp/mysql.sock or /var/lib/mysql.sock. However if you specify localhost as 127.0.0.1, then it connects with a TCP protocol equivalent to --protocol=TCP.

MySQL does not work on localhost without Local Area Connection

I use WampServer (Apache, PHP, MySQL) and have no problems when some kind of network adapter(wireless or lan) is connected (i.e. Local Area Connection has status connected) even if i am not connected to the internet (for example when i am connected to the router but that is not connected to the internet).
When there is no network connection, I get a php error like MySQL could not connect to 127.0.0.1 on port 3306.
Interestingly, telnet 127.0.0.1 3306 says that it could not connect to the port, even when the server and MySQL are running fine (i.e. when some kind of local area connection is connected).
So I turned off all kinds of firewall (antivirus and Windows) but still no difference in anything. And that is why this issue is quite puzzling.
Things I have already tried (will update this list along the way):
The skip-networking directive in my.ini.
You could modify your MySQL server and client configuration to connect to one another using a named pipe instead of a TCP/IP loopback connection. That way, the current state of the network connection should have less impact.
To do so, start the server with --enable-named-pipe or the corresponding config file setting, and execute the client with --pipe or --protocol=PIPE. Similar configurations should be available for your PHP connector as well. It may depend on which library you use there, and whether or not it will take the mentioned configuration settings from the my.ini file (settings without leading -- there).

possible to use more then 65535 ports for Xmpp PubSub or Comet implementation?

In Comet/Reverse Ajax/PubSub underlying technology/fundamental is Long polling. So connection is kept open for a minute or so..
And as per my little knowledge about networking and OS, TCP/IP supports only 65535 ports, so my question is how any server can support more then 65535 connections concurrently?
In application I am building, All users are going to connect at same time, and wants live updates from server.. like stock treading realtime updates..
Cheers,
You are correct in that there are 65535 unique port numbers, but a TCP server application allows many clients to connect to the same port on a server. For example, in a web server all clients connect to port 80. Connections are uniquely identified by the 4-tuple (src-address, src-port, dest-address, dest-port).
You will definitely want to read about the so-called C10K problem when designing your implementation.
each connection is attributed as follows:
source ip (could be any)
source port (could be any in range 1024-65535)
destination ip (your server ip)
destination port (specific port your app is running on)
so the number of connections to the server is limited by the number of all possible ips multiplied by the 64000 (roughly). no server can handle that as of yet... :)