When running the downloadable CloudFoundry instance how do I retrieve the IP Address? - networking

I have downloaded the Micro Cloud Foundry v1.1.0 instance and am configuring it to work offline per the instructions available here: http://blog.cloudfoundry.com/post/9962996319/working-offline-with-micro-cloud-foundry
However when I get ready to setup the SSH Tunnel (which I was successful with once before) I can't find the IP address anymore. According to the instructions it is supposed to be displayed where it shows "IP Address: (network up)" but it no longer is displaying.
Any idea on another way for me to get the IP Address of the instance?

Did you try menu option 1, refresh console to see if it comes up? Or menu option 8, restart network?
You should be able to also login to the Ubuntu console and see networking information. Press Alt-F2 to switch to a login prompt. For the username enter vcap and enter the password you gave when you first booted and configured the Micro Cloud Foundry VM. After you've logged in, run the command ifconfig to view network and IP information.
One last thing: confirm your VM NIC is set to NAT mode rather than Bridged. If you change it, be sure to reboot the VM for it to take effect.

Related

How to determine source of mysterious server name on my network

Over the last few days I have noticed a mysterious (unknown to me) server hostname that shows up on both Ubuntu's Nautilus Network section as well as Windows File Manager network group. The hostname does not show in the list of clients on my router. If I double click the hostname icon to try to connect to it I get a connection refused error. The hostname's appearance is random.
I have non-factory admin and wireless passwords set on my router as well as MAC filtering. Router firewall is on and no unneeded service ports are opened (NFS, etc.).
How can I determine the source of this unknown hostname and how can I close down my network in case this is really someone that has managed to break into my network? Also, if I have explicitly listed the MAC addresses of all my devices how could a non-listed device be able to connect?
Thank you for any comments you can provide.
Resolved; see previous comment on NetBios over TCP/IP.

Meteor - accessing the app using public ip

I can access the app using localhost:3000 but I am trying to test from mobile devices locally, without having to deploy it. But I couldn't access the site.
I am allowing incoming request:
sudo ufw status verbose
Status: active
Logging: on (low)
Default: allow (incoming), allow (outgoing)
New profiles: skip
To Action From
-- ------ ----
3000/tcp ALLOW IN Anywhere
3000/tcp ALLOW IN Anywhere (v6)
I found that my ip address is 128.84.125.239 and so I visit 128.84.125.239:3000 and nothing happens.
This turned out to be an issue of using the right IP, or configuring the NAT of the router appropriately. Using a service such as cmyip.com will only provide you with your external IP address. This address can only reach your meteor app if your router is configured accordingly, i.e., the router will forward requests on port 3000 (or whichever port you are running your app on) to your server.
For testing on a mobile device during development you are most likely best off using your internal IP address, assuming your mobile device is on the same network as your app-serving machine.
On Linux you can use ifconfig to get your internal IPs. If you are connected via ethernet then you'll be looking for the device eth0 (in most cases). If you are connected over wifi, then the device you are looking for is typically called wlan0.
On Mac OSX you can use ifconfig as well, and look for devices called enX, where X is a number (often 0, or 2).
Your service is probably only running locally (on local ports, 127.0.0.0/8), To confirm this, run netstat -tulpn to see what services are running and on what ports/interfaces. If you don't see 0.0.0.0:3000 or 128.84.125.239:3000 then you won't be able to get ti it from the IP you are trying and you need to change the bind address of your app to be that IP (or all interaces).

Share the internet access from laptop to beaglebone black and then access it through VNC server

I am trying to share the internet with the Beaglebone Black from my laptop. Here is what I tried till now-
I connected Beaglebone Black to my laptop running Windows 8 via USB cable. Then, I went to network and sharing center. Then, the network which I want to share, I shared it with the Beaglebone(It says Local Area Connection). Now, I went to the Gate one SSH on Beaglebone and wrote - "ping www.google.com". But it said "Unknown Host".
Now, since the above didn't work, I connected the Beaglebone Black with the standard ethernet cable and again tried sharing my network, but it still didn't work.
Here is what I am trying to do-
If I am able to connect to internet, I want to set up VNC server and through that I want to load the GUI of linux on my laptop.
Any help will be greatly appreciated. If there is any other method to accomplish this, please tell me about it. I have tried most of the tutorials on the internet, but didn't succeed.
Here is the detailed answer, after long long waiting I finally figured out how to share internet on BBB. This question is being seen at least 10 times everyday so I though I should answer it by my own. (Also SO gave me Popular question badge for this!)
First thing I tried was:
I connected the BBB(running angstrom) to laptop (running windows 8). The laptop recognized the device and I was able to SSH it through putty.
Now, I tried to ping my computer back whose IP address is 192.168.7.1 .. This step never worked for me, my BBB was never able to ping my computer back but, I was able to ping the beaglebone itself through the provided IP that is 192.168.7.2 (which is obvious)
I searched everywhere on internet and did everything to overcome this glitch such as:
I made the default gateway in BBB to 192.168.7.1
/sbin/route add default gw 192.168.7.1
but that also didn't worked.
I previously thought that it is necessary for me to ping 192.168.7.1 in order to get the internet on BBB.
Since nothing was working I decided to skip this step.
I simply connected the BBB, and then went to network and sharing center in windows 8 and from there, I shared the internet connection from my wifi connection to the beaglebone.
As you will do this, you will see that BB will loose its connection from the putty (if you started putty before network sharing), This is because computer assigns an IP to the BB which you have to change to 'Obtain the IP automatially'
To do this right click and go to properties of the BB connection and then from the list select the IPV4 tcp/IP and go to its properties. In that, you will see the option 'Obtain IP automatically'
Now again start putty (as previous connection will get terminated) and you will see that BB is able to connect.
Now simply add the default gateway as I showed above and then you will be able to ping 8.8.8.8 or any other IP address. Now, simply add the nameserver like this:
cd /etc
more resolv.conf
nano resolv.conf
and add this line below nameserver 127.0.0.1
nameserver 8.8.8.8
and save it, you will be able to ping google.com.
Now comes the VNC server part. For that case also I was wrong. To connect to VNC server you do not need internet connection on the BBB. Yes, you will need that for installing the VNC server on it but not afterwards. Once it is installed, you have to simple do this in BB:
x11vnc -bg -o %HOME/.x11vnc.log.%VNCDISPLAY -auth /var/run/gdm/auth-for-gdm*/database -display :0 -forever
and press enter and BB will reply with VNC started at port 5900
Thats it, now comeback to windows and start VNC server, add the address 192.168.7.2 and you can see the GUI on the screen. I am also able surf internet on the beaglebone.
Thank you for the support and if I am wrong here in my question then please notify me.
Also if you have any doubt, refer to this awesome video my derek molloy: He has explained it very well and remember to skip the step of pinging back 192.168.7.1 if it is not working.
I have not yet figured it out. I will edit the answer once I get it.
1) On your Beaglebone:
sudo su
ifconfig usb0 192.168.7.2
route add default gw 192.168.7.1
2) Now share the network and make sure your pc's ip is 192.168.7.1 after you do
connect beaglebone black to router via ethernet
now use
adb tcpip 5555
adb connect bbb_ip:5555 then use adb shell
The problem you're facing is of resolving nameservers. If you're able to access the device through SSH (using PuTTy, for example), then you can provide it internet too- but the device needs to know where to look for.
The BeagleBone Black has a utility called Connman that manages its connections.
/usr/lib/connman/test has functions related to it.
Use ./set-ipv4-method in there to set different values. Be sure to set the nameservers right. If in doubt, use 8.8.8.8 as the only entry. Also note that the gateway for your BeagleBone must be your computer.
If you're not a newbie and need more detailed instructions, see this.
To continue from the answer provide by Vikas Arora, 3 things you have to do primarily to provide ethernet over usb connection to your Beaglebone. Firstly, share your PC internet connection with the local network made with Beaglebone, a process well explained above. And also setting up the IP address to be obtained automatically.
Secondly, setting up the nameserver to the public DNS server address 8.8.8.8 also explained above. But this setting is not persistent i.e. once you reboot, the settings will be lost. It is because the network manager on Angstrom 'connman' resets the etc/resolv.conf on startup. To correct that I disabled the connman service on my device by going to /lib/systemd/system and
firing commands
systemctl stop connman.service
systemctl disable connman.service
This will make your nameserver file persistent and you can always start connman service again if you need.
Thirdly you have to set your gateway to the address of your internet sharing machine also explained above. But this setting is also not persistent. To do that make a script like below in your home directory
echo "********Setting up the default gateway"
route add default gw 192.168.7.1
and make a service that will kick off on startup and trigger your script. A process well explained at
https://askubuntu.com/questions/506167/how-do-you-save-the-routing-table-on-the-beaglebone-blackangstrom
and
http://mattrichardson.com/BeagleBone-System-Services/

Windows Phone 8 emulator can't connect to the internet

I have Windows 8 installed inside of an emulator, and the new WP8 SDK installed on it. My problem is that the emulator can't connect to the internet. I don't have any proxy, and even disabled the firewall. It still doesn't seem to work though. When I look at the Network Connections sections I can see the new connections the hyper-v manager created for the emulator, and also the automatic bridge created, but even there the network status is "No Internet Connection".
Are there some properties I can manually change in Hyper-V or for the network to make everything work?
Update: I've done everything suggested including create my own switch and delete all others. It still doesn't work however. It doesn't work on cable and not on wifi. Maybe I'm missing something with how to set this up?
Also the WP emulator keeps offering me to connect to the internet every time. It always erases all of the definitions I've set up, replacing it with it's own definitions.
I think I've finally found the answer, but you're probably not going to like it. It would appear that the phone emulator requires you to have a second network adapter to dedicate to this purpose. Personally, I run Windows 8 in VMWare, and so a second network adapter is free for me.
Anyway, after you get the second network adapter that you can dedicate for the phone emulator(must have internet)
Start from scratch. Go to the Hyper-V manager and delete the emulator along with all of the virtual switches
Start the emulator from Visual Studio; this will recreate it with all default settings(select yes you want to configure it to connect to the internet)
Shut it down
Now, go back to the Hyper-V manager
Delete the snapshot that was just created for the emulator. This will prevent your changes from disappearing
Find the virtual switch for your second network adapter in the Network Adapter settings(under control panel)
Disable TCP/IPv4, 6 and all other services. This prevents your host machine from trying to use the connection. While you're there, get the MAC(Physical) address of this adapter
Find the virtual-switch for your second network adapter under the Hyper-V settings for the emulator
Change the MAC type to static and paste in the MAC address of the adapter
Enable MAC spoofing (not sure if required, but just in case)
Then, find your virtual switch under "Virtual Switch Manager".
Ensure "Allow management operating system to share this network adapter" is unchecked and that all extensions are disabled
Click OK and then start the emulator from Visual Studio!
Basically, it appears that for some odd reason it won't properly work unless the phone has the same MAC address as the network adapter. However, we can't just set it to use the same MAC address because address conflicts are very very bad. So, we need a second adapter that we can dedicate to the Phone emulator. The reason we disable TCP/IP on this adapter is so our host machine doesn't use it and cause these conflicts.
Other things to try:
The emulator keeps randomly breaking for me. I'll list a few other things I messed with this last time that got it to work(not sure if related, so only try these if the steps above aren't working
"Reordering" of network adapters for the emulator so that the external virtual switch is at the top (make sure to copy over the MAC address for the internal adapter)
Removing unrelated network adapters
Restarting your machine after recongiguring virtual switches
Praying to your local Microsoft evangilist
Seriously. Everytime I stop phone work for a while and come back, the emulator is always magically broken without me changing anything. No idea how to get it to work "permanently".
I had the same issue as well. However as someone else pointed out on the official forums it didn't work if you had a static IP for your PC set up in your router. Removing it and let the DHCP assign my PC an IP solved the issue for me.
Source
Here's what worked for me:
Go into the internal network connection created by hyper-v in network connections on the host computer. Go to TCP/IP V4 and go to advanced. Change the metric from automatic to 10.
Go to the external network connection, do the same but set the metric to 1.
Volia, internet in the emulator.
I tried following steps , Not sure if it will work for you
1> Delete All emulators in Hyper-v
2> Remove all virtual switches from virtual switch manager
3> Go to Network connections in control panel and manually disable (right click and click disable) all the connection except the one which provides internet.
4> Start the emulator from Visual studio
Something else that seems to also cause an issue is Fiddler.
I had Fiddler open and running (as I was monitoring other HTTP requests), and it was stopping the emulator from connecting.
As soon as I closed Fiddler, the emulator starting connecting perfectly.
Start Hyper-V Manager
Open Virtual Switch Manager
Remove the Windows Phone Emulator Internal Switch from the list and apply changes
After installing Windows Phone Emulator on my Yoga laptop, I immediately had the following problems:
emulator apps cannot reach the internet
host computer internet connection is terribly slow and almost unusable
I was discouraged and thought I would have to do some drastic and desperate acts to fix things, but got lucky with the following steps which completely solved my problems (for now). The steps are verbose (intended for the readers' benefit), but are actually very simple in practice.
....0: Unplugged ethernet cable (to remove it from the equation) but stayed connected to WiFi. Problems still remain but at least there is less complexity now.
....1: In Control Panel / Network Connections / Change Adapter Settings, deleted Network Bridge (required for Step 2 to work).
....2: Opened Hyper-V Manager, right-clicked on the emulator VM item and selected Virtual Switch Manager. Selected "Windows Phone Emulator Internal Switch" and changed the radio button from Internal to External (this was only possible after deleting the Network Bridge (Step 1)).
At this point, the emulator can now connect to the internet (and Control Panel shows WPEIS finally 'has internet access'); however deployment of WP build binary from VS to emulator fails - it just hangs when I try to build-and-deploy from Visual Studio (so a new problem has surfaced (temporarily)).
....3: Returned to HyperV Manager, went back to Emulator VM's Virtual Switch Manager and reverted Windows Phone Emulator Internal Switch from External back to Internal.
I can now successfully build-and-deploy WP build from Visual Studio to emulator. And emulator retains its networking ability. Also the host machine's network connection also returned to healthy.
I hope this helps someone. Good luck!
I went through many of the suggested solutions, also with no luck. What finally worked for me was to fix a vmware warning about guest OS trying to set promiscuous mode for ethernet adapter (http://kb.vmware.com/kb/287).
Try this solution, it works for me (no need of DHCP)
Step 1 - using Hyper-V start the server, once started u can see the two new network adapters added in the (network sharing) page.
Step 2 - go to your visual studio IDE where your application runs, using Emulator run your application, once started try to open IE, it will not connect to internet.
Step 3 - now again come back to network sharing page right click on external adapter which was created newly select properties, hit on sharing tab, now check the two options to have tick mark if not tick that two options and click on OK.
Step 4 - internal adapter which was created newly will be changing the domain name from Unidentified network to your shared Domain name, once changed try to access the IE again in emulator which runs already. now i hope the internet connection works.
Thanks,
Baskar
After spending about 3 days on this i finally got it working. (on Windows 8 using WiFi)
Start Fresh, Remove HyperV, Restart, Install Hyper V, Restart
Open your VS solution and run the emulator.
When prompted for letting the emulator access the internet say yes.
Let the emulator and your project fully load
Shut down the emulator and VS
Open Network and Sharing Centre
Click change Adapter Settings (on the left hand side)
You should have some new adapter created by HyperV, they should be called "vEthernet(...)"
The ones you are interested in are the vEthernet( Virtual Switch) and vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch)
Open the properties on your vEthernet( Virtual Switch) and navigate to the sharing tab.
Choose Allow other Network users to connect and choose the vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch) as the adapter
Ok the changes, and then open the properties on vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch)
Disable Internet Protocol Version 6 and double click on Internet Protocol Version 4
Use the following IP address: 169.254.169.177 Subnet mask:255.255.0.0
Click advanced, under the IP settings tab, assign an interface metric: 1
Open VS and re run your project under and emulator, wait a few minutes for it to load.
Try and open IE within the emulator and confirm you have internet access.
Good luck
After 3 days we have finally solved it. We had to make ip address dynamic. After making it dynamic emulator could reach internet. We didn't have to change anything else.
Good article: http://blogs.msdn.com/b/wsdevsol/archive/2013/10/01/why-can-t-the-windows-phone-emulator-go-online.aspx
I had DHCP reservation on my router, like #robertftw said. I configured a static IP for vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch) adapter and everything works.
Disabling the Wifi, and Virtual Wifi inside "Network Connections" worked for me.
My Windows Phone emulator had been assigned an IP address by DHCP on a different Subnet to the one I am using.
Manually assigning an IP address on the same subnet as my PC to the vEthernet port created by Hyper-V resolved this issue.

EC2 instances not responding to internal ping

I did a script that launch several amazon instances with the same security group which is the default one, with ICMP and all the TCP/UDP connection allowed... so no firewall problem.
I am running an ubuntu 11.4 64 bits ami working fine.
Usually in the bunch of machine I launch some do not respond to any ping or telnet connection. They can ping other machines but cannot be pinged. The other machines can ping each other in two directions without any problem, but usually one or two just don't respond to any ping. There is no difference in the way I launch them, so I don't understand where this bug comes from...
How to avoid this problem and recover from it without restarting the EC2 instance?
Thanks a lot tender developpers :D.
try this
Log into AWS account.
Click on Security Groups. Choose the required security group.
Click on the Inbound tab.
Create a new rule:
Custom ICMP rule
Type: Echo request
Source: 0.0.0.0/0
0.0.0.0 will allow everyone to ping your server. You can specify your own addresses if you want.
Assuming all the instances you launch have the same security group and same ami, you need to contact amazon about this.
https://forums.aws.amazon.com/thread.jspa?threadID=22640

Resources