Click here to Skip to main content
15,896,912 members

Comments by Chirantan Ghosh (Top 5 by date)

Chirantan Ghosh 29-Oct-15 17:25pm View    
Hello,

The client program is a third party program so cannot change that :(.
Chirantan Ghosh 29-Oct-15 17:24pm View    
Hello,

Thanks for your reply.

Please have a look of my above comment where I tried to explain more on my situation.
Chirantan Ghosh 29-Oct-15 17:22pm View    
Hello,

Thanks for replying.

I am not telling there is a any problem with the NAT of the VM . NAT is working perfectly as it supposed to. Even as you asked to test the internet access , that is also working fine from the VM. Any network request initiated from internal of VM is working fine as long as that never requires a server initiated connection as well.

And here I am telling a situation where a connection request is initiated from a external server to the VM.This won't work and thats agreed also as NAT network works in that way.

To iterate once more , if a VM is sitting behind a NAT network on the host PC and any software running in the VM also requires a connection initiated from server that will never work.

For example, Active FTP will never work from a VM with NAT as the procedure requires a server initiated data connection but Passive FTP will work as it does not require that.

However, this problem can be overcome if the VM is connected to bridge network to the host.

In my problem I am using a software which in running in the VM with NAT and in its procedure of connection it requires a server initiated connection for which it is failing and I was wondering if somehow I can correct this without changing the network mode from NAT to bridge by playing with the port numbers.
Chirantan Ghosh 28-Oct-15 13:46pm View    
Hello Tonex247,

Thanks for sharing the link. This is quite a solution but the number of minimum ports can be mentioned here is 255 which is a lot. I want to make less number as available port.

do u see any solution for that?
Chirantan Ghosh 28-Oct-15 13:32pm View    
Okay , let me give the background of the problem I am dealing with.

I have a virtual machine which is connected to the host computer through NAT network. There is a program which is running inside the VM and it is connecting to an external server address. Now in this particular process of the connection the client sends a random port number to server so that server can also connect back to that specified port of client. Now as the VM is sitting behind the NAT network the actual ip address of the VM is not exposed to the server(ip address of VM is converted to the ip of the host computer and sent to server i.e. that's how NAT works) so actually the server fails to connect back.

To resolve this issue I was wondering if I can use the specified port forwarding facility of the virtual machine for NAT network. For that I need to know which port the client program inside the VM is going to select for sending to the server.Forwarding that port with the host computer should help. As the client program is probably selecting any random available port number so to stop that I was wondering that if I limit available the port numbers so that the client program will be forced to use the specified port number which is also known to me. This known port number can be forwarded which should solve the issue.

So my question is will it be possible to write any program which will block any range of ports from getting available to any other programs which are looking for random available port. Of course, then I will be able keep some specified port number available for the programs which makes me able to know what is the port number that will be selected when asked by any program

Any other solution of the problem mentioned above is also appreciated.