Perforce - Windows server 2016 can't connect from client - windows

I am trying to set up my Azure Virtual machine to become a Perforce remote repository server.
First let me take you through the installation of Helix on the server:
And after the install is complete it says:
So far so good now from my client computer (my local desktop) I attempt to connect to this server, however, I get an error:
Now first I thought that the port wasn't open in my inbound so I added the following network rule in my Azure cloud portal:
However, this didn't do anything for me and I get the same error.
So now I am left kinda stranded. Has anyone had this issue and know how i can connect to my remote machine from perforce?
From the comment below when i type p4 info i get the following:
User name: ******
Client name: PerforceServer
Client host: PerforceServer
Client unknown.
Current directory: c:\Users\*****
Peer address: 127.0.0.1:50413
Client address: 127.0.0.1
Server address: PerforceServer:1666
Server root: C:\Users\*****\VersionControl
Server date: 2018/11/21 14:44:12 +0000 Coordinated Universal Time
Server uptime: 00:01:27
Server version: P4D/NTX64/2018.2/1724420 (2018/11/02)
Server license: none
Case Handling: insensitive
However using the prefix PerforceServer:1666 i still cannot connect
When running netstat:
TCP 127.0.0.1:50688 PerforceServer:1666 TIME_WAIT
TCP 127.0.0.1:50689 PerforceServer:1666 TIME_WAIT
Also if i run p4d i get the following error:
Perforce server error:
Listen 1666 failed.
TCP listen on 1666 failed.
bind: 0.0.0.0:1666: WSAEADDRINUSE

Allow the port through the Windows firewall.
1)Press Windows logo + X keys on the keyboard and select Control panel from the context menu.
2)Select System and Security from the options and click on Windows Firewall from right side panel of the window.
3)Click on Advanced settings and select Inbound Rules from left side panel of the window.
4)Click on New Rule under Actions tab from right side panel and select Port radio button from the window.
5)Follow the onscreen instructions and check if the changes are effective.

Related

unable to connect to windows netcat listener

I set a netcat listener on my windows 7 machine
nc -nvlp 4444
Then I try to connect to it via kali linux:
nc -nv <Target_Ip_address> 4444
I get a connection refused. However, if I connect locally from the windows machine to the port I get a successul connection. In addition, when I run an nmap scan on the port I get its filtered. However, I never messed with any firewall and there are other ports that are open. The only problem is I can not open any ports to connect to (including port 4444) besides the ones already opened. Any help would be appreciated
I have tried to open other ports besides 4444 but none work. I attempted to connect to the ports already open and those worked.
I run nc -zvw3 <Target_IPAddress> 4444 on kali linux and get connection timed out. I verify the port is open on windows machine by netstat -a. I don't understand why I can't connect
Some ports will be open in windows by default. What you're looking for is the advanced firewall settings.
You can find this by pressing WIN+R and entering wf.msc. You can also find the advanced settings in Control Panel/System and security/Windows Firewall/Advanced settings. Here, you can add new policies to your inbound and outbound rules for both programs and ports.
Per example, here is how you open up port 4444 for inbound traffic:
Go to "Inbound Rules"
Click on "New Rule..." in the actions list
Select "Port"
Choose whether you want to apply your rule to TCP or UDP traffic
Enter 4444 in the textbox
Choose "Allow the connection"
Check where the rule should apply
Give it a name.
Make sure to pay attention to what you do however as it is very possible to introduce security risks here.

FTP server running on Port 2000 over NAT not working on Passive Mode

I am running FILE-Zilla ftp server on windows in one of the LAN pc connect to my router. i am trying to access the FTP server from the network outside of the router using Router WAN ip (WAN-to-LAN) by adding Port-Forwarding rule (NAT) in the router. I have 2 cases here as per below configurations. the 1st is working and the 2nd is not (in Passive mode).
Note: i have added the custom inbound rule in the windows 7 firewall
where the ftp server is running.
Configuration #1
Filezilla FTP server port: 21
Passive port range: 50000-51000
NAT - external port: 21
NAT - internal port: 21
Windows firewall inboud rule port allow port: 21, 50000-51000
Client connecting to: <Wan IP>:21
This is working if client is trying to connect using Active/Passive mode
Configuration #2
Filezilla FTP server port: 2000
Passive port range: 50000-51000
NAT - external port: 21
NAT - internal port: 2000
Windows firewall inboud rule port allow port: 2000, 50000-51000
Client connecting to: <Wan IP>:21
This is working only if client is set to Active mode.
Not working with Passive mode configuration by client. the client can connect and login is successfull but ends with the error message at server side like this without any directory listing.
227 Entering Passive Mode (192,168,1,2,195,85)
Note: both the case working in LAN-LAN network.
My guess is that the configuration #1 works only because the NAT is smart enough to translate the IP address in the PASV response from the server. But it likely does that only for the standard FTP port.
You should tell the FileZilla FTP server its external IP address. Go to Edit > Settings > Passive mode settings > IPv4 specific > External Server IP Address for passive mode transfers.
Currently your FTP server is sending its internal IP address to the client. And the client obviously cannot connect to the IP address.
And have the NAT forward the ports in the passive port range (50000-51000).
Though the change will break the LAN-LAN connections. To allow both LAN and WAN connections, check if the NAT can be configured to translate the IP address for the non standard ports too. Though the translation will work for unencrypted connection only anyway. And you should not use unencrypted connections!
The last option is to use the extended passive mode (EPSV), if your clients allow that. In the extended passive mode, there's no IP address in the response. The FTP client uses the primary IP address of the FTP server for data connections.

Perforce client connecting to server WSAETIMEDOUT

I've been ripping my hair out for a few days over this and need help. I have a perforce server and an external client. Steps I've taken:
1. Opened port 1666 on my router (TCP and UDP) for my servers IP.
2. Allowed port 1666 through windows firewall.
3. I can connect to the perforce server from any system on the LAN by hostname or IP.
4. NETSTAT -a shows port 1666 is LISTENING.
5. External client can ping the server by external IP.
6. Internal client can telnet to the internal IP and port, external cannot.
I can not for the life of me figure out why the hell my external client cannot connect to the server. I am getting my external IP from "WhatsMyIP.org" and it matches my routers WAN address.
I have full on tried to disable windows firewall and still the same issue.
Please god someone help before I lose the rest of my hair.
EDIT1: I forgot to mention the error I am receiving from the external client:
Connect to server failed; check $P4PORT.
TCP connect to 99.252.60.60:1666 failed.
connect: 99.252.60.60:1666: WSAETIMEDOUT
You may want to take a look at your router's firewall rules in more detail.
I had a similar problem with my home setup that resulted in me having to modify some firewall settings on the router.
This KB also gives some information about the error:
http://answers.perforce.com/articles/KB/2960/
After working at this for three days, I found the issue with help from this forum post:
http://208.74.204.155/t5/forums/forumtopicpage/board-id/Getting_connected/thread-id/8923/page/1
My router model (Hitron Technologies CGN2-ROG) that I received from my ISP (Rogers up here in Canada) apparently doesn't play nice when it comes to port forwarding. With all of the EXACT same settings, I bridged that router to another spare I had laying around and it worked perfectly.
I literally just plugged in the new router and it worked without making any other changes at all.

Connection from IIS7 to sql server fails when outbound traffic is blocked

I'm using windows 2008 R2 with IIS 7.5 (default config) trying to configure my firewall to block all outgoing connections, to prevent malicious attacks from "phoning home".
What outgoing rules do I need to create to enable the web application to connect to SQL Server default instance? The SQL server is under my control and it's running port 1433 for sure.
The webserver works fine. But the connect to DB step fails.
When I ping the sql server 2012 from the web server, I get the following:
Pinging xxx.0.0.xxx with 32 bytes of data:
General failure.
General failure.
General failure.
General failure.
I have already tried the following:
Created an outbound rule for port 1433 for w3wp.exe for port 1433
Created an outbound rule for WWWPublishing service for port 1433
When the above failed, I created an outbound rule for ALL programs
and applications for 1433, still no go.
When all failed. I tried to enable ALL the included rules in the
list, still didn't help
Tried connection string with data source=xxx.0.0.xxx and data
source=xxx.0.0.xxx,1433 both worked with outbound allowed, and both faild when outbound is blocked.
Created a new rule to enable RPC, so I created a rule for all TCP
traffic for services.exe
The only way to get it to connect, is to change the default behavior for the firewall to Allow outgoing traffic.
Just to reiterate, the only connection that is failing is web-server-> sql server.
Internet to Web server is fine.
Which port/program am I missing?
1433 is the port your remote machine listens to not the outgoing port of the clients.
Outgoing ports are dynamically assigned by the OS.
Go on a process basis.
An outbound rule All Ports of w3wp to 1433 works.

Could not connect smtp server on port 25

I'm using a windows 7 PC
When I try to test an smtp connection through telnet giving the command:
telnet smtp.gmail.com 25
It shows a message:
could not establish connection to host, on port 25: connection failed"
How do I get my PC to establish a connection with the smtp host on port 25?
I checked the possibility of a Firewall blocking the port and also try using the telnet command on ports 465 or 587.
It works for me. Perhaps your ISP has a policy of blocking outbound port 25 connections, except to their official outgoing SMTP servers. That's why many services support
alternate port numbers for their SMTP service. You didn't say what the results were
for the alternate ports, so it's hard to say for sure whether that's your problem.
I also faced the same problem. The solution works for me
Either off the firewall OR Follow the below steps:
Open Windows Firewall with Advanced Security
Open Inbound Rules New Rule
Choose Port type
Choose TCP, and enter the required port - in our case, 25
Choose to Allow the connection Choose all three profiles (Domain+Private+Public)
Enter a custom rule name, e.g. "Port 25"
Press finish
Check whether SMTP port 25 is opened or not
a. Open up a command prompt.
b. Type “telnet <server_ip> 25” then hit enter.
c. Once you are determined the results. Type quit and hit enter
Important: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you shouldn't disable your antivirus software. If you have to temporarily disable it to install other software, you should re-enable it as soon as you're done. If you're connected to the Internet or a network while your antivirus software is disabled, your computer is vulnerable to attacks.
Click Start, Programs, McAfee, VirusScan Console.
Double-click Access Protection
select Anti-virus Standard Protection
Unchecked enable access

Resources