I can't do connection with 3270 port - mainframe

I have just installed a mainframe emulator and I have problems for running it. I think the problem is my 3270 TCP port. Reading a guide I found somebody say that you can do this:
telnet 127.0.0.1 3270
but when I try the answer is:
The connection to the host it can't be opened with port 3270 more or less
(I have windows in spanish) . Error on the connection.
Do you know how can I get connection with this direction and this port?

If I understand you correctly, you are trying to eliminate issues with your 3270 emulator configuration by attempting to telnet to the mainframe from the PC. Again, if my understanding is correct, then you need to use
telnet <ip or hostname of the mainframe>
In your example, you are using the local loopback address.
It is unlikely that you should be using port 3270. 3270 connections are typically configured on port 23, which is the default telnet port.
If the connection to the mainframe is successful, you can input any character string in the terminal and then press Enter.
An error such as this:
IKJ56710I INVALID USERID,xxxx
Will validate the fact that the port is open and that your emulator issues are down to something other than network problems (probably local configuration).

Related

Microsoft Azure, issue with open ports

Currently hosting a microsoft azure server that has a SCP: Secret laboratory game server on it.
OS: Ubuntu 20.04
After setting up the server and downloading the server files, I can't seem to connect to the server. The port that is needed for the game server is 7777 and I have the port open under NSG with UDP and TCP protocol, but after using multiple port checkers and trying to connect in game, I always got the port closed answer or was given a connection error.
I have tried using the azure's own troubleshooter, but that says the ports are open. Tried different ports like 7778 or 7779. Checked the firewall, but I dont even have it enabled.

How do I connect two computers using the same router?

I’m using the python socket module on a Mac.
How do I connect two computers using the same router? I need a TCP socket with fast data passing between.
When I tried just hooking two computers up by their private ip address, then I got a Connection Refused error. How do I do this?
You can check first whether connection is allowed between two devices by going to one device and running telnet.
telnet <Private-IP-of-Second-Device> <Port>
If this shows connected then connectivity is good and issue exists with the socket module you have written.
If this fails you can try checking the firewall by going to System Preferences > Security & Privacy > Firewall.

VS2019 Remote debugger - unable to connect

I am trying to connect to VS2019 remote debugger installed on virtual machine (Windows Server 2022 version 21H2) hosted in Azure cloud.
Remote debugger is installed correctly and I've checked that TCP port number in options is set to 4024.
Now, when I try to connect from my machine I got an error message
Unable to connect to 'hostname'. The Visual Studio 2019 Remote Debugger (MSVSMON.EXE) does not appear to be running on the remote computer. This may be because a firewall is preventing communication to the remote computer. Please see Help for assistance on configuring remote debugging.
So the first thing we tried was properly set up firewall and open needed ports. After that it still doesn't work.
I've checked which ports msvsmon.exe process listens on and found out it does not use the preferred port 4024 but rather it listens on some random ports.
netstat -abo -p tcp
TCP 0.0.0.0:20031 hostname:0 LISTENING 9920
[msvsmon.exe]
TCP 0.0.0.0:20035 hostname:0 LISTENING 11148
[msvsmon.exe]
Even when remote debugger window falsely states
1.9.2022 14:25:26 Msvsmon started a new server named 'hostname:4024'. Waiting for new connections.
I've also tried starting msvsmon.exe with /port option. GUI says it used this port but in fact it still listens on some random port.
Any idea, why msvsmon starts server on random port instead of the one set in options?

Cannot SSH To Microsoft Azure Linux VM (Ubuntu 17.10)

I created a new Linux VM (Ubuntu 17.10), and trying to connect to SSH through CloudShell, but the command ssh suren#40.71.218.244 take forever and does not connect.
Port 22 is enabled.
I tried telnet from my local mac, and able to connect
telnet> open suren.eastus.cloudapp.azure.com 22
Trying 40.71.218.244...
Connected to suren.eastus.cloudapp.azure.com.
Escape character is '^]'.
SSH-2.0-OpenSSH_7.5p1 Ubuntu-10ubuntu0.1
Connection closed by foreign host. here
What am i missing?
After trying several things, a hard-refresh of browser and re-login to Azure Portal did the trick. After i login, i could see the option to "Request a cloudhsell and choose the type".
Adding screenshots, may help others.
From the above troubleshooting that has been done the only conclusion is that you are in a restricted network that block port 22.
You can use Port Query tools like tcping, psping or portqry to determine if port 22 (Default SSH Port) is listening. If you system can't communicated over port 22 then you might want to try when connected to a different network.

UDP connection refused

This is what I am trying to do:
I have a windows computer and a Linux computer (ubuntu 16.10) connected to the same wireless router. The router is not connected to the Internet, as this might raise some security concerns (and we don't want the windows computer to talk to the net).
The windows computer is running a program that is supposed to stream data to an UPD port (say port 1234). Using the Microsoft TCPView utility I can see that the windows machine opens the port. In fact, it should allow connections from any IP address and any port (that's what the *'s mean in TCPView).
View of the TCPView Utility
When I try to find the open port on the windows machine from the Linux computer using nmap this is what happens:
Starting Nmap 7.01 ( https://nmap.org ) at 2017-01-30 16:50 EST
Nmap scan report for 192.168.0.164
Host is up (0.051s latency).
PORT STATE SERVICE
1510/udp open|filtered mvx-lm
MAC Address: 74:DE:2B:D8:26:24 (Liteon Technology)
At the very least, this tells me that the linux machine can see the windows machine (I can also ping it). However, I am not sure about the open|filtered state of the port. According to the Nmap manual:
Nmap places ports in this state when it is unable to determine whether
a port is open or filtered. This occurs for scan types in which open
ports give no response. The lack of response could also mean that a
packet filter dropped the probe or any response it elicited. So Nmap
does not know for sure whether the port is open or being filtered. The
UDP, IP protocol, FIN, NULL, and Xmas scans classify ports this way.
When I try to connect to the port using Python, an error occurs. This code
import socket
UDP_IP = "192.168.0.164"
UDP_PORT = 1234
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind((UDP_IP, UDP_PORT))
results in an error 'connection refused'. A little C++ client program that is supposed to read out the streamed data also fails to connect to the port. I am using Python now to test the accessibility of the port more quickly.
In contrast, connecting to TCP port 8080 works fine. Also, I have been sending data back and forth over TCP through the same router between other machines and using a range of ports.
Other important info:
The same errors occur if I switch off the firewall and virus scanner on the windows machine
I have added UDP port 1234 as an allowed connection in the advanced firewall settings of windows.
So, my questions are:
Does anybody have any suggestions about how to debug/solve this situation?
What's different between UDP and TCP that would cause TCP to work without a hiccup (in my past projects) and causes UDP to give me nightmares?
You are forgetting that UDP is not a connection-based protocol. It is a datagram protocol.
There is no way to distinguish between a server that is receiving UDP packets but not responding to them, from a server which is behind a firewall which drops those packets. This is why nmap is describing a port as open|filtered -- there is no way for it to tell the difference.
Your call to sock.bind is failing because you are trying to bind (that is, to start listening for packets!) to a port on a remote IP. This is impossible in general.
It turns out that my problems were two-fold
1) I did have a bad understanding of the UDP protocol. That's been rectified by the answers in the forum. For anyone interested in how to use UDP and Python to communicate between two computers, see this recipe: http://code.activestate.com/recipes/578802-send-messages-between-computers/
2) The windows program that I was trying to communicate with can not be used to to send data over UDP through wifi. Why? I don't know. I called the developer and that's what he told me.
Current status: the problem is not solved but is diagnosed as a combination of my lack of knowledge and an ideosyncratic windows program (see my original post above)
You are trying to bind to a non-local IP address. Use 0.0.0.0 instead of the target address you're using, and connect() or sendto() the target address.

Resources