Windows 7 as Public Server - windows

I want to create a TFTP server on my computer, and I found a program named TFTPD32 that can help me. But when I try to bind my local IP (192.168.X.X) to a public one as I see in a tutorial, it doesn't show as a possible choice in that program.
As far as I know, to make this to work you need to install a server OS like Windows Server 2008, and Windows 7 Ultimate is a client one.
Is there a way to configure Windows 7 Ultimate as a public server?
Or maybe I am doing something wrong?
P.S.: I am sorry for my bad English.

If you can get that working in a LAN environment, then the solution is what ElGalivan said - take a look at the NAT table in your router.
Typically you need to do NAT over the UDP port 69 to your sever LAN IP address.
http://en.wikipedia.org/wiki/Network_address_translation

Tftpd32 can only "bind" to IP addresses available to the Windows OS where Tftpd32 runs.
In the very unusual case that your host is directly attached to a public IP Tftpd32 sure will have that public IP available for binding.
In a more normal case your host will be behind a router/NAT etc then your host will only have private IPs (192.168.x.x) available. In this case you should forward certain IP ports in your router in order to let exterior users reaching your server services.
But please consider; you should never do this with TFTP; TFTP is a protocol not meant for Internet traffic. It is used in the early stages of PXE booting strategies in LANs (Local Area Networks).

Related

Access xampp from VMWARE to Public IP

Is it possible to access 127.0.0.1:8080 publicly i have a project application that is running on VM, What should I do?
Diagram:
VMachine( where xampp is installed) IP <-> Global(external) IP (167.1.174.21:8080)
I don't have any option left what should i do i'm really new to this. #respect
Yes, this is possible but there are multiple steps to the configuration and the details for each steps differ depending on the hardware/software used. In general though it can be accomplished like this:
VMware config
Configure the VM with a bridged network
Configure the guest OS to either have a dhcp reservation or static ip.
Router config
Add a dhcp reservation for the VM (if using DHCP)
Add a port forwarding rule pointing to the VM's IP address
XAMPP config
Make sure the XAMPP server is listening on all interfaces.
The key point is to make the Virtual Machine to have bridged connection.
You can do it by looking at this one.
After that do a Port Forwarding to the virtual machine like it a real machine on your LAN.
Step 1 : Apart from above solution, in your local network where xampp is installed, make your local ip as static one, like "192.168.1.125" from router settings->Address reservation option.
Once you reserve address
Step 2 : Open your router->port forwarding->set port & ip to forward.
Step 3 : Now you check your public ip, and bingo now you can go to your public ip from vmware or from any other network.
As long as the vm has a configured network and is therefor able to communicate with your LAN (using Bridged networks in the VM configuration is a good way to go) and the internet, it is possible to make it accessible to the external web/internet.
Therefor you would most likely need to define a port-redirect/port forwarding on your router, that all incoming packets on the external IP (167.1.174.21) on port 8080 gets forwarded to the local ip of your vm and the related xampp session.
A possible problem at that point might be changing IP addresses of the VM based on a possible DHCP configuration. Either use a fixed IP on the VM or configure some mac-based rule for fixed IP or increase the lease time of the dhcp-server (your router to unlimited)
That's the theory, but please think twice before you do so. Running a webserver which is available in the wild is not recommended if you are not used to IT security. And even if you decide to do so, using xampp sounds wrong to me ears. xampp is designed for local development & testing purposes, not for productive use.

java socket server hosting

I am creating an android client app connected to a Java server using sockets. At the moment I am working both on my pc. How can I upload my Java server to an online server so I can set my app to friends and test it?
I used OpenShift but could figure our how and if I can use it for what I want.
Also I looked at Amazon ec2, but they need credit card information, something that I would prefer not sharing for this.
Is there any way I can do this for free?
Thanks
Make sure you have a computer able to connect to the internet, and that can run 24/7. Then run your server on that computer, assume you run it on port 8080. Make sure that your host computer's IP address is it to static, otherwise DHCP will give it a different IP every time it connects to the router.
To allow your friends to connect, unless if they're on the same LAN as your host, you will need to port forward port 80 -> ComputerIP:8080 on your router. Once that's done, you will need to retrieve your router's global IPv4 address from it's configuration page and then send that to your friends.
If they're on the same LAN as your host, then you can just give them the IP address of your host computer.
If you port forwarded your server and you would like to get a host name, like stackoverflow.com, you're going to need to buy that from whoever owns the host name you would like to use. I don't know many details about how to update the DNS servers though.
If your server is local and you would like a host name, then just go onto your router configurations page and tell it to automatically assign each computer the default gateway as the primary DNS and then add a mapping in the router's DNS settings to map the host name to your computer's local IPv4 address. Note that not all routers support this feature.
Edit: You'll also need a good bandwidth to support multiple simultaneous connections.

Is it possible to connect to Apache on my desktop from my phone while using Chrome Remote Debugging?

I'm doing this (Chrome Remote Debuggin): https://developers.google.com/chrome-developer-tools/docs/remote-debugging
I'd like to be able to access localhost or any of my vhosts (via apache on my desktop) from my phone so that I can debug a local site.
Is there ANY way to do this?
Thanks so much!
Do I understand correctly that you are running Apache on a workstation and want to connect your phone to a website hosted on it?
Yes, that is possible. The simplest method is to join your phone to the same network (WiFi) as your workstation and connect your phone to http://IP-ADDRESS-OF-WORKSTATION. Then use the Remote Debugging as usual.
Alternatively, you need to configure your WiFi router to enable port forwarding. The basic idea is your WiFi router controls traffic between your private home network (where your workstation is) and the public Internet (where your phone is), and port forwarding allows inbound traffic from the Internet to be routed into your private network.
Here's the configuration page for my WiFi router. My workstation's private IP address is 192.168.1.5 and I'm running Apache on the default port 80. If my public IP address was 8.8.8.8 then I would enter http://8.8.8.8:3000 in my phone's browser, and the router would redirect the request to my workstation at 192.168.1.5:80.
In either setup, you'll need to find your workstation's private IP address (e.g., use "Open Network Preferences" from your WiFi status icon on Mac OS X). You can find your WiFi router's public IP address by just googling "my IP address" from your workstation.
Obviously the first method (placing your phone and workstation on the same network) is quite a bit simpler. Port forwarding can be tricky to debug, and the configuration is slightly different for every router. Do post follow-up questions if you get stuck somewhere.

Resolve host name to an ip address

I developed a client/server simulation application. I deployed client and server on two different Windows XP machines. Somehow, the client is not able to send requests to the server.
I tried below options:
Pinged server machine successfully from client using ip-address.
Pinged client machine successfully from server using ip-address.
Checked netstat command line tool from both machines. Server is in LISTENING mode and client is in SYS_SENT mode. But the foreign address it is using to send is host name not the ip address.
Pinged server machine unsuccessfully using host name from client.
Pinged client machine successfully using host name from server.
I feel the problem is when the client is trying to connect to the server using the host name.
Could you please let me know how to force an application to use an ip address instead of a host name? Is there any other way to map the host name to an ip address?
Go to your client machine and type in:
nslookup server.company.com
substituting the real host name of your server for server.company.com, of course.
That should tell you which DNS server your client is using (if any) and what it thinks the problem is with the name.
To force an application to use an IP address, generally you just configure it to use the IP address instead of a host name. If the host name is hard-coded, or the application insists on using a host name in preference to an IP address (as one of your other comments seems to indicate), then you're probably out of luck there.
However, you can change the way that most machine resolve the host names, such as with /etc/resolv.conf and /etc/hosts on UNIXy systems and a local hosts file on Windows-y systems.
Try tracert to resolve the hostname. IE you have Ip address 8.8.8.8 so you would use; tracert 8.8.8.8
You could use a C function getaddrinfo() to get the numerical address - both ipv4 and ipv6.
See the example code here
This is hard to answer without more detail about the network architecture. Some things to investigate are:
Is it possible that client and/or server is behind a NAT device, a firewall, or similar?
Is any of the IP addresses involved a "local" address, like 192.168.x.y or 10.x.y.z?
What are the host names, are they "real" DNS:able names or something more local and/or Windows-specific?
How does the client look up the server? There must be a place in code or config data that holds the host name, simply try using the IP there instead if you want to avoid the lookup.
Windows XP has the Windows Firewall which can interfere with network traffic if not configured properly. You can turn off the Windows Firewall, if you have administrator privileges, by accessing the Windows Firewall applet through the Control Panel. If your application works with the Windows Firewall turned off then the problem is probably due to the settings of the firewall.
We have an application which runs on multiple PCs communicating using UDP/IP and we have been doing experiments so that the application can run on a PC with a user who does not have administrator privileges. In order for our application to communicate between multiple PCs we have had to use an administrator account to modify the Windows Firewall settings.
In our application, one PC is designated as the server and the others are clients in a server/client group and there may be several groups on the same subnet.
The first change was to use the functionality of the Exceptions tab of the Windows Firewall applet to create an exception for the port that we use for communication.
We are using host name lookup so that the clients can locate their assigned server by using the computer name which is composed of a mnemonic prefix with a dash followed by an assigned terminal number (for instance SERVER100-1). This allows several servers with their assigned clients to coexist on the same subnet. The client uses its prefix to generate the computer name for the assigned server and to then use host name lookup to discover the IP address of the assigned server.
What we found is that the host name lookup using the computer name (assigned through the Computer Name tab of the System Properties dialog) would not work unless the server PC's Windows Firewall had the File and Printer Sharing Service port enabled.
So we had to make two changes: (1) setup an exception for the port we used for communication and (2) enable File and Printer Service in the Exceptions tab to allow for the host name lookup.
** EDIT **
You may also find this Microsoft Knowledge Base article on helpful on Windows XP networking.
And see this article on NETBIOS name resolution in Windows.

Is it possible to make localhost work through a Virtual Machine?

I am using a Macbook running 10.6. I am using VMware Fusion to run an Ubuntu Server minimal virtual machine. Ubuntu Server is running your basic LAMP stack.
I do my development in Mac OS. I have VMware share a directory from Mac OS to the Ubuntu Server. Ubuntu Server uses that directory for apache.
I access my server is Mac OS in firefox using the ip address of my virtual machine. This is a pain because I have to find out what the ip address is of my virtual machine each time I boot it up. I could set a static ip address but this causes problems if I move my Macbook from network to network.
Is there any configuration (NAT or Bridged or something) that would let me access my virtual machine from the Mac OS using localhost or something similar?
Thanks
NAT should be OK. Your VM is on a different subnet that way, you can give it the static IP you like, and it won't interfere with the (dynamic) IP on your real network.
What you are looking for is the host-only networking adapter as opposed to the NAT or bridged adapters. This creates a network interface on the virtual machine that only connects the actual host. It is perfectly safe to set an IP address for this interface that does not change, and there will be no tricky NAT getting in the way. It's a little network that only exists for communication between the real host and the virtual host. It's exact purpose is so you can do development like this. I use the same feature on VirtualBox all the time, but VMWare has it as well.
Now, with a host-only adapter you might be worried that your VM now has no access to the Internet. The answer is simple. Just make two adapters. eth0, eth1. Make one of them a bridged or NAT adapter for Internet access. Make the other one the host-only adapter for your development. Most modern Linux distros will automatically route accordingly. I know for a fact that Ubuntu does, because I do it all the time. Again, this is with VirtualBox. Your mileage may vary with VMWare, but I can't imagine it's that different.
I'm using Virtual Box and typing in the computer local address (for instance 192.168.1.100) instead of localhost did the trick.
Maybe I'm misunderstanding your question but why not just add an entry in your hosts file for the virtual machine? That way you can access it with some arbitrarily assigned name (like testmachine) instead of the IP.
This is the first tutorial I found through google: http://decoding.wordpress.com/2009/04/06/how-to-edit-the-hosts-file-in-mac-os-x-leopard/
This would work best if your VM has a static IP, BTW (either no DHCP or configure the DHCP server to give that MAC the same IP every time). That way you don't have to worry about changing the hosts entry every time the DHCP server gives the VM a different IP.

Resources