{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/fbctf/issues/219","repository_url":"https://api.github.com/repos/facebook/fbctf","labels_url":"https://api.github.com/repos/facebook/fbctf/issues/219/labels{/name}","comments_url":"https://api.github.com/repos/facebook/fbctf/issues/219/comments","events_url":"https://api.github.com/repos/facebook/fbctf/issues/219/events","html_url":"https://github.com/facebook/fbctf/issues/219","id":178249084,"number":219,"title":"Installing/running on Azure cloud","user":{"login":"eeeehaw","id":19915509,"avatar_url":"https://avatars.githubusercontent.com/u/19915509?v=3","gravatar_id":"","url":"https://api.github.com/users/eeeehaw","html_url":"https://github.com/eeeehaw","followers_url":"https://api.github.com/users/eeeehaw/followers","following_url":"https://api.github.com/users/eeeehaw/following{/other_user}","gists_url":"https://api.github.com/users/eeeehaw/gists{/gist_id}","starred_url":"https://api.github.com/users/eeeehaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeeehaw/subscriptions","organizations_url":"https://api.github.com/users/eeeehaw/orgs","repos_url":"https://api.github.com/users/eeeehaw/repos","events_url":"https://api.github.com/users/eeeehaw/events{/privacy}","received_events_url":"https://api.github.com/users/eeeehaw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-21T05:20:50Z","updated_at":"2016-09-22T22:02:09Z","closed_at":null,"body":"I've been trying to get fbctf running on an Azure VM that is running Ubuntu 14.04.  I can ssh into the machine remotely and have setup http and https endpoints on Azure, but when attempting to access fbctf from a browser nginx sends an error \"502 Bad Gateway\".  I'm thinking it may be related to fbctf being hard coded to work on IPaddr 10.10.10.5, instead of the IPaddress assigned by DHCP to the machine??  Or is there another possible cause?\r\n\r\nFBCTF is installed on the Azure Ubuntu VM in \"production\" configuration/mode, so Vagrant is not installed (I have confirmed Vagrant is not installed), therefore changing the private IPaddress in the Vagrantfile has NO effect.  How can I change the IPaddr that fbctf uses for http/https etc? \r\n\r\nIt would be useful to publish an architecture description of the fbctf system so users know what each program is doing (eg, is nginx being used as the webserver, or proxy, or load balancer, or some combination of those?)\r\n\r\nHere's some info captured from the Ubuntu console terminal for that Azure Ubuntu server VM (note that the Azure Endpoint for ssh/http/https/et al points to the VM's DHCP assigned IP address, which may change between VM start/stop sessions):\r\n--------------\r\nlogin as: azureuser\r\nazureuser@cyberwars.cloudapp.net's password:\r\nWelcome to Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-38-generic x86_64)\r\n   __               _                 _     _____ _______ ______\r\n  / _|             | |               | |   / ____|__   __|  ____|\r\n | |_ __ _  ___ ___| |__   ___   ___ | | _| |       | |  | |__\r\n |  _/ _' |/ __/ _ \\  _ \\ / _ \\ / _ \\| |/ / |       | |  |  __|\r\n | || (_| | (_|  __/ |_) | (_) | (_) |   <| |____   | |  | |\r\n |_| \\__,_|\\___\\___|_.__/ \\___/ \\___/|_|\\_\\\\_____|  |_|  |_|\r\n\r\n\r\n\r\n  System information as of Wed Sep 21 02:04:16 UTC 2016\r\n\r\n  System load: 0.16              Memory usage: 6%   Processes:       97\r\n  Usage of /:  6.1% of 28.80GB   Swap usage:   0%   Users logged in: 0\r\n\r\n  Graph this data and manage this system at:\r\n    https://landscape.canonical.com/\r\n\r\n  Get cloud support with Ubuntu Advantage Cloud Guest:\r\n    http://www.ubuntu.com/business/services/cloud\r\n\r\nNew release '16.04.1 LTS' available.\r\nRun 'do-release-upgrade' to upgrade to it.\r\n\r\nYour Hardware Enablement Stack (HWE) is supported until April 2019.\r\n\r\nLast login: Tue Sep 20 17:48:54 2016 from c-73-19-22-162.hsd1.wa.comcast.net\r\n\r\nazureuser@cyberwars:~$ ifconfig\r\neth0      Link encap:Ethernet  HWaddr 00:0d:3a:f7:27:0e\r\n          inet addr:100.104.72.32  Bcast:100.104.75.255  Mask:255.255.252.0\r\n          inet6 addr: fe80::20d:3aff:fef7:270e/64 Scope:Link\r\n          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1\r\n          RX packets:1040 errors:0 dropped:0 overruns:0 frame:0\r\n          TX packets:1268 errors:0 dropped:0 overruns:0 carrier:0\r\n          collisions:0 txqueuelen:1000\r\n          RX bytes:357664 (357.6 KB)  TX bytes:186026 (186.0 KB)\r\n\r\nlo        Link encap:Local Loopback\r\n          inet addr:127.0.0.1  Mask:255.0.0.0\r\n          inet6 addr: ::1/128 Scope:Host\r\n          UP LOOPBACK RUNNING  MTU:65536  Metric:1\r\n          RX packets:0 errors:0 dropped:0 overruns:0 frame:0\r\n          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0\r\n          collisions:0 txqueuelen:1\r\n          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)\r\n\r\nazureuser@cyberwars://var/log$ curl -4ivk https://100.104.72.32\r\n* Rebuilt URL to: https://100.104.72.32/\r\n* Hostname was NOT found in DNS cache\r\n*   Trying 100.104.72.32...\r\n* Connected to 100.104.72.32 (100.104.72.32) port 443 (#0)\r\n* successfully set certificate verify locations:\r\n*   CAfile: none\r\n  CApath: /etc/ssl/certs\r\n* SSLv3, TLS handshake, Client hello (1):\r\n* SSLv3, TLS handshake, Server hello (2):\r\n* SSLv3, TLS handshake, CERT (11):\r\n* SSLv3, TLS handshake, Server key exchange (12):\r\n* SSLv3, TLS handshake, Server finished (14):\r\n* SSLv3, TLS handshake, Client key exchange (16):\r\n* SSLv3, TLS change cipher, Client hello (1):\r\n* SSLv3, TLS handshake, Finished (20):\r\n* SSLv3, TLS change cipher, Client hello (1):\r\n* SSLv3, TLS handshake, Finished (20):\r\n* SSL connection using ECDHE-RSA-AES128-GCM-SHA256\r\n* Server certificate:\r\n*        subject: O=Facebook CTF\r\n*        start date: 2016-09-20 18:01:56 GMT\r\n*        expire date: 2017-09-20 18:01:56 GMT\r\n*        issuer: O=Facebook CTF\r\n*        SSL certificate verify result: self signed certificate (18), continuing anyway.\r\n> GET / HTTP/1.1\r\n> User-Agent: curl/7.35.0\r\n> Host: 100.104.72.32\r\n> Accept: */*\r\n>\r\n< HTTP/1.1 502 Bad Gateway\r\nHTTP/1.1 502 Bad Gateway\r\n* Server nginx is not blacklisted\r\n< Server: nginx\r\nServer: nginx\r\n< Date: Wed, 21 Sep 2016 18:09:58 GMT\r\nDate: Wed, 21 Sep 2016 18:09:58 GMT\r\n< Content-Type: text/html\r\nContent-Type: text/html\r\n< Content-Length: 166\r\nContent-Length: 166\r\n< Connection: keep-alive\r\nConnection: keep-alive\r\n\r\n<\r\n<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n* Connection #0 to host 100.104.72.32 left intact\r\nazureuser@cyberwars://var/log$\r\n\r\n------------------------"},"comment":{"url":"https://api.github.com/repos/facebook/fbctf/issues/comments/249041314","html_url":"https://github.com/facebook/fbctf/issues/219#issuecomment-249041314","issue_url":"https://api.github.com/repos/facebook/fbctf/issues/219","id":249041314,"user":{"login":"eeeehaw","id":19915509,"avatar_url":"https://avatars.githubusercontent.com/u/19915509?v=3","gravatar_id":"","url":"https://api.github.com/users/eeeehaw","html_url":"https://github.com/eeeehaw","followers_url":"https://api.github.com/users/eeeehaw/followers","following_url":"https://api.github.com/users/eeeehaw/following{/other_user}","gists_url":"https://api.github.com/users/eeeehaw/gists{/gist_id}","starred_url":"https://api.github.com/users/eeeehaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeeehaw/subscriptions","organizations_url":"https://api.github.com/users/eeeehaw/orgs","repos_url":"https://api.github.com/users/eeeehaw/repos","events_url":"https://api.github.com/users/eeeehaw/events{/privacy}","received_events_url":"https://api.github.com/users/eeeehaw/received_events","type":"User","site_admin":false},"created_at":"2016-09-22T22:02:09Z","updated_at":"2016-09-22T22:02:09Z","body":"No, both the error.log and access.lot are empty, or more specifically \nthere are about 50 blank lines.\n\nHere's the /var/log/hhvm directory attributes:\ndrwxrwxr-x 2 www-data  www-data    4096 Sep 20 17:55 hhvm\n\nHere's the file permission attributes:\nazureuser@cyberwars:/var/log/hhvm$ ls -l\ntotal 0\n-rw-rw-rw- 1 root     root     0 Sep 20 17:55 access.log\n-rw-rw-r-- 1 www-data www-data 0 Aug 16 01:33 error.log\n\nLooks like HHVM should already have access/write privileges to this IF \nit's the Owner in a system Group?  (I see that the Other section has \nonly read permission; I'm not aware of how HHVM is permitted in the \nUbuntu system)  If not, how can I fix it?\n\nTHX Ian for your ongoing attention on this, highly appreciated by me.\n\n--Stephen\n\n\nOn 2016-09-22 11:29, Ian Carroll wrote:\n> Do you see anything in /var/log/hhvm/error.log now? Or in any log file\n> inside /var/log/hhvm?\n> \n> If not, make sure HHVM can write to that directory and files.\n> \n> --\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub [1], or mute the\n> thread [2].\n> \n> \t*\n> \n> Links:\n> ------\n> [1] https://github.com/facebook/fbctf/issues/219#issuecomment-248987804\n> [2]\n> https://github.com/notifications/unsubscribe-auth/AS_i9eqOb8hC4ZALwSoscYp6TBAVWjsjks5qsskkgaJpZM4KCaRO\n"}}
{"actor":{"display_login":"eeeehaw"}}