my host OS is window7;
my guest OS is centos7 is runing on virtualbox;
i hope share centos7's files for window7 via samba server;
the samba server is runing in the centos7;
when centos7 connect network with "Bridged networking" or "Host-only networking" ;
Assuming that the centos7 IP is 10.254.254.254;
i can Configuring a-network-driver for window7,like "\\10.254.254.254\www",it is working;
now,i only want to use "Network Address Translation Service (experimental)" for the centos7; but i still want to share centos7's files for window7 via "samba server";
i can Configuring port forwarding with NAT,like that:
hostIP:port <= guestIP:port
0.0.0.0:80 <= 10.254.254.2:80
127.0.0.2:22 <= 10.254.254.2:22
now i can visit my web : http://192.168.1.8 or http://127.0.0.2;
and connect the ssh server: 127.0.0.2:22
it working;
but,if i Configuring the smb port forwarding with NAT,like:
127.0.0.2:445 <= 10.254.254.2:445 (it not working)
127.0.0.2:139 <= 10.254.254.2:139 (it working)
i know i can not re-bind the 445 port for "centos's" smb server;
so, i can not share file via "\\127.0.0.2\www";
then,i google,some one say:"window smb server and client port is 445";
now i think:"can i change the window's port of 445 to anyother number,4450?5555?",if it can,i can Configuring the smb port forwarding with NAT,like:
127.0.0.2:4450 <= 10.254.254.2:445
127.0.0.2:1390 <= 10.254.254.2:139
i had try :
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NetBT\Parameters
Value Name: SmbDeviceEnabled
Type: REG_DWORD
Value Data: 0
and then restart window7, but the "netstat -p TCP -noba" still show me:
[svchost.exe] TCP 0.0.0.0:445
try change port to 5555,and restart,but fail,the port still show me 445
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters\Smb]
"SessionPort"=dword:0000022b
"DatagramPort"=dword:0000022b
any idea ?
thank you!
Because of this problem cannot be solved;
I am using the following solutions now:
1 rebuid my nginx service from nginx-source,to add webDAV mod;
2 share centos7's files via nginx-webDAV service;
why?
because i found:
when i use "host-only" and "NAT" for centos,They are all the LAN IP address ;
when the guest os's ip setting like that:
the interface of "host-only":
IPDDR=10.254.254.254, and my host os don't sharing my WIFI for it,
so it can't connect to WAN,
becuase i only want it share me centos's files ;
the interface of "NAT" :
ipddr=10.0.0.2,it can connect to WAN,
for the other services,like:ssh/web/mysql, and so on;
then ssh/web/mysql don't know connect to which GATEWAY.
maybe i can write some "route" to fix it,but it is a big bad thing;
Related
Due to several circumstances, I need to configure my windows client to be able to receive through another port than 445 or 139 with Samba communication. The idea is to avoid as much as possible having to install any additional program in windows 10, or if necessary, that it could be configured through code in c++. For my tests, the samba server is running on a Linux machine.
First of all, I’ve tried the samba communication without changing the port and it works perfectly, executing in windows (Start→Run): \\[Ip_Server]\
To change the port in the server, I've added the line smb ports = 2000(this port number is just for the example) in the "/etc/samba/smb.conf" file and checked the change with:
netstat -an| grep -iE ":2000".
After that, in the client I've tried the following steps:
To disable Samba 1.0
To delay the startup of the lanmanserver driver:
sc config lanmanserver start= delayed-auto
To check if the IpHlpSvc driver is running:
sc config iphlpsvc start= auto
To add a portproxy rule to reroute TCP port 445 to the port 2000 (of course, rebooting after that)
netsh interface portproxy add v4tov4 listenaddress=[Ip_client] listenport=445 connectaddress=[Ip_client] connectport=2000
(I've tried this step with both IPs, client’s and server’s, and changing the order of the ports). After that, I try again the samba connection, and I'm not able to connect with the server.
If anyone knows what the problem might be and has a solution, it would be helpful.
Using Add rule in windows firewall, I was able to open TCP port 15537. When i am trying to executing command netstat -ano on terminal windows, this port is not listed. I tried to execute telnet command on terminal window (e.g. telnet IP port) but getting
Connecting To localhost...Could not open connection to the host, on port 15537: Connect failed
Then I downloaded PortQry application and execute it from different machine, this machine is also in the same network, the result I received was
"Not Listening".
I already spent more than 2 days and asked internal group but could not find solution.
Note: both machines are having Windows 10 OS.
No solution is needed as no problem is indicated in the question. You have opened a TCP port successfully. You have not made any attempt to cause anything to listen to that TCP port.
It's not clear what results you expected, but you got the results that you should have expected. Nothing is wrong. The port is open because you opened it. Nothing is listening on that port because you didn't set anything to listen on that port.
There may be some forwarding rules? Since the purpose of access is not on the local machine, the netstat command cannot see the port on listening, but it can see the next action based on this port, usually to do some forwarding
I am not very familiar with windows firewall configuration, but I know that if there is a forwarding rule in linux, like
-p tcp -m tcp --dport 8080 -j {other forwading chain}
we can not see 8080 listening on this host (netstat -tunpl), but telnet host:8080 may see connected
Use nmap instead of netstat for detecting opening port
nmap -p your_port_number your_local_ip
Run service on that port
For eg- In my case,in order to open port,I use
"service ssh start" or "service apache2 start "and it's open port 22 and 80 for connection respectively in my linux machine.
On using nmap in my lan network both ports opened.
Hope it help
I am trying to connect Cloudera VM from my Windows desktop using Winscp for file transfer.
But I am not able to connect it using winscp. It is showing me connection timeout error.
Anybody has any idea how to solve this issue.
Thanks,
Atul
I figure out, bow to do it. The error was I am referring wrong IP address. To know right IP address and connect follow below steps.
First, if the Cloudera VM is running then shutdown it.
Second, go to setting. refer below screenshots
Then start the Cloudera VM again.
Go to terminal.
Type the command ifconfig.
On Consol you will find eth1 - where you have to look for ipnet, next to it is your IP address, which you have to use to connect to VM. note down the address.
Go to windows.
Open Winscp.
Create New Site.
Put the host name as the IP address which we got from consol
Username- cloudera, password- cloudera
Port-22
Click on Save.
Click on login.
Hope this will help.
Thanks,
Atul
I can connect to cloudera VM 5.15 from winSCP from my laptop(windows).
I am using Virtual box.
I have downloaded VM from cloudera official site and then choose option file-import appliance ,it will choose by default Network adapter NAT and then I followed as mentioned below.
add cloudera.quickstart in hosts file
C:\Windows\System32\drivers\etc\hosts
localhost name resolution is handled within DNS itself.
127.0.0.1 localhost quickstart.cloudera
Recommended VirtualBox Configurations
Right click on the VirtualMachine and click Settings
Setup the VM to allow you to copy and paste from that machine to your local and vice-teversa
Click on General -> Advanced
Set Shared Clipboard to Bidirectional
Setup port forwarding from port 2222 to port 22 to allow SSH to the machine
Click on Network -> Advanced -> Port Forwarding
Add a new entry
Name: 2222
Host Port: 2222
Guest Port: 22
Accessing the VM
SSH’ing to the Machine
Default SSH Credentials: cloudera/cloudera
Host to connect to: localhost
Because of the Recommended VirtualBox Configuration above, we’re forwarding connections from port 2222 to 22. So you would want to use port 2222 to connect.
Windows
Open putty/winscp
Use ip as 127.0.0.1
Set 2222 as the port
Connection Type: SSH
Click open
Enter the password
I am trying to install Red5 on server (Windows Server 2012R2) so that I can use it remotely.
What I have tried till now...
case 1:
-set the path for java jre.
-I installed red5 with ip 127.0.0.1 with port no 5080 (already opened this port)
-Start the red5 service.
-Working fine.
But the problem is It's working as localhost, I was not able to access it as remotely then I changed "red.properties" and set rtmp.host to my server IP,
But It didn't work for me.
Case 2:
-I reinstalled red5 server with my server IP with port 5080
-open 5080 port on firewall
-start the server
This setting also didn't work for me.
Where Should I make change to access it remotely..?
Assign correct ip in red5.properties
Change passwords in realm.properties
Open firewall for port 1935 for RTMP and 5080 if you want to access the webserver
(control panel - system and security - windows firewall - advanced settings - new inbound rule - port tcp)
Red5 guide for more installation techniques and videos : link
I have my Single node Hadoop installed on Google Compute Engine instance and i want to open port 50070 on that machine to access the hadoop dashboard. i configured in the firewall rule as tcp:50070 in compute engine networks. but still i am unable to access my port outside the network (ie . via internet). I tried nmap for the public ip of my GCE instance and i got a result which has only ssh port got opened all other ports are filtered .
Note: i am using debian 7.5 image
Make sure your daemon is listening on port 50070. If you have more than one networks in you project make sure the port is opened on the right network. You can run the following commands to check the information about your instance and network.
lsof -i
gcutil --project= getinstance
gcutil --project= listnetworks
gcutil --project= listfirewalls
gcutil --project= getfirewall
Check if IP/Port is allowed in iptables or not.
iptables -L
would show you all the records.
To allow port in iptables you can do the following:
sudo iptables -A INPUT -p tcp -m tcp --dport 50070 -j ACCEPT
sudo iptables-save -c
Short answer
In addition to configure the firewall rule at GCE web console make sure that your server is listening at 0.0.0.0 instead of 127.0.0.1
Long answer
In the context of servers, 0.0.0.0 means all IPv4 addresses on the local machine. If a host has two IP addresses, 192.168.1.1 and 10.1.2.1, and a server running on the host listens on 0.0.0.0, it will be reachable at both of those IPs - Source
In contrast 127.0.0.1 is the IP address used to stablish a connection to the same machine used by the user this address is usually referred as the localhost.
It's often used when you want a network-capable application to only serve clients on the same host. A process that is listening on 127.0.0.1 for connections will only receive local connections on that socket. - Source
Hence, if you try to stablish a connection to your server from internet and your server is listening at 127.0.0.1 at your GCE machine, then, from the server point of view a request has never been received and as a consequence Goocle Cloud Firewall will refuse the connection because there is no server listening at the opened port (in your case 50070).
I hope this answer helps to solve your problem. Best regards.