trying to connect from localhost
ssh <MyLogin>#localhost - connected
trying to connect from another computer in my local network
ssh <Mylogin>#<MyServerLocalIp> - connected
trying to connect from internet
ssh <Mylogin>#<InternetIp> -conection refused (it not appears in my log file)
i'm check 22 port in this site http://www.canyouseeme.org/ - 22 port is open and it appears in my log file
trying use telnet
telnet InternetIp 22 - not connected
but when i'm trying another port
telnet InternetIp 21 - connected
This sounds like you are behind a NAT Router.
If this is the case, what you will need to do is first ensure your machine has a static IP address. This will likely be something like 192.168.1.x. You can configure this in your router by either mapping your machines MAC address to a DHCP assigned address or just configuring you machine with a static IP and checking that that IP is not in the DHCP range.
Then you will need to configure your Router to forward inbound port connections to the local IP address of your machine. Here is an article on Wikipedia about Port Forwarding: http://en.wikipedia.org/wiki/Port_forwarding
Your best bet is to download the manual for your specific Router and look up the section on port forwarding. It is often in the section about the routers Firewall.
Related
I have a program that runs from wsl 1 listening to grpc requests under port 5032. When I want to communicate from windows to that program I use host name localhost and the specified port, it works. But when I tried to look up the ip address via ip route and sending requests to that ip with the same port from different machine it didn't work.
Is it possible to send requests from another machine to wsl?
If yes, what should be done: maybe some additional configuration is needed or could I use the wrong ip?
I have installed the peerjs server on my windows server as per github, and successfully get the message:
“Started PeerServer on ::, port: 9000, path: /myapp”.
I then opened port 9000 in the windows firewall, and find the following two entries in the netstat listing:-
TCP 0.0.0.0:9000 vmBCE3892:0 LISTENING
[node.exe]
TCP [::]:9000 vmBCE3892:0 LISTENING
[node.exe]
My server has 2 different IP addresses for 2 different web applications under IIS.
To check peerjs connectivity I used telnet as follows:-
telnet ipaddress 9000
with each IP address, neither would connect.
I cannot see how to tie the peerjs server to one of the ipaddresses or the corresponding domain name.
It seems that my ISP blocks all ports other than 80 & 443, despite them appearing to be available in my firewall. As for the two IP adresses, either would have reached peerjs server had the port been open.
Trying to post a website via port forwarding but everytime I use an open port check tool it says that the port cannot be reached. I was wondering if someone out there has done port forwarding in this router. Thank you.
These are the settings for my port forwarding:
Protocol: TCP
WAN host start & end IP: Blank
WAN Start and End Port: 8080
LAN host start and end port: 8080
WAN Connection: TR069
LAN host address: my IP
I have set up a static IP address, and even changed the port of httpd.exe to 8080 and 8081 (xampp) because I thought my ISP was blocking port 80.
Any type of help is appreciated. Cheers.
I was battling this over a month only to discover that I have a CGNAT (Carrier given NAT [NAT from ISP]) So no matter what settings I changed on my router my ports will never be opened.
Today finally my ISP removed the NAT from my account and I was able to proceed to open ports.
So I am sharing this info now for any others who may have difficulty opening their ports.
For the ZTE F670L GPON ONT router, you need to login as an admin:
Username: admin -
Password: Web#0063
Proceed to Internet in the main tab and select Security in the left panel then
in the sub tabs select Port Forwarding.
I also have DMZ enabled. Here are the screenshots of my settings.
(Please be sure that your PC/device IP is static)
Screenshot of my static IP on my PC
https://i.imgur.com/Ug51E7k.png
Screenshot of port forwarding settings for port 16000 UDP (I opened both TCP and UDP)
https://i.imgur.com/F3KP6PG.png
Screenshot of DMZ settings. (Not always necessary)
https://i.imgur.com/4MZWP1A.png
If your ports are not opened after just the normal port forwarding settings, you can try to enable DMZ as in the above screenshot. If still no luck, contact your ISP and ask them to remove NAT from your account.
I hope this helps
I kept blaming my poor router when in fact it was just my ISP.
What I did to solve this problem was made a listener request in my case on Linux, using the following command "nc -l -p PORT", before that you need to set up correctly the port forwarding on the F670L, then you go to a web port checker and just fill with your ip, and the port that you opened.
It will work only with the first request, then the port will close.
Hope you can solve it
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.
I have a REST service running on Mac OS X, which im currently accessing using "localhost:8888" and "10.0.2.2:8888"
I want to access the same service from another computer which is in the same network.
I disabled the firewall also and I typed
nc -v 192.168.1.3 8888
and got the result as
nc: connectx to 192.168.1.3 port 8888 (tcp) failed: Connection refused
currently i use localhost (to access using java application) and 10.0.2.2 (to access using android application runs in the simulator) which both runs on the same machine which the server runs too.
I want to put the android application to my phone and give the machine ip addess ( because if i connect to internet via wifi, it'll be in the same local area network) i should be able to access my service runs on my machine.
can some one please tell me what im doing wrong here? Thank you
You can't access localhost from your front end code. It needs to refer to the server's name or address.
The localhost address should be 127.0.0.1, which is in the loopback range of addresses. Any address in the 127.0.0.0/8 block can never appear anywhere on any network, nor can any address in that block be used as a source or destination address outside a host. It is not possible for one host to access anything in that address range on another host.
The goes back at least as far as RFC 990, ASSIGNED NUMBERS:
The class A network number 127 is assigned the "loopback" function,
that is, a datagram sent by a higher level protocol to a network 127
address should loop back inside the host. No datagram "sent" to a
network 127 address should ever appear on any network anywhere.
RFC 1122, Requirements for Internet Hosts -- Communication Layers:
(g) { 127, }
Internal host loopback address. Addresses of this form MUST NOT
appear outside a host.
Also RFC 3330, Special-Use IPv4 Addresses:
127.0.0.0/8 - This block is assigned for use as the Internet host loopback address. A datagram sent by a higher level protocol to an
address anywhere within this block should loop back inside the host.
This is ordinarily implemented using only 127.0.0.1/32 for loopback,
but no addresses within this block should ever appear on any network
anywhere [RFC1700, page 5].