cr38g Posted August 19, 2022 Share Posted August 19, 2022 After spending much hours reading and watching videos about how to set and use the Pineapple with Cloud C2, finally it was working. Now, after ten days of using this marvelous piece of equipment, my Internet connection got interrupted, and the problem is that the Mark VII did not reconnect to the C2. My server is with Linode, and the C2 is enable as a service for when it reboots for any reason. I have not found how to reconnect. I use the service --status-all, but the "C2" does not showed. I also start the "service --start-all" command, but with no avail. Please, can anyone assist? Thank you. Link to comment Share on other sites More sharing options...
dark_pyrro Posted August 19, 2022 Share Posted August 19, 2022 As I understand your post, you can't get the C2 server (or service really) itself to run. If so, I can't see why any internet interruption would cause this to happen. If you log in to a terminal on that Linode based server, can you see any process running that relates to C2? I would suggest to review all the service settings for the C2 server and make sure it's all correct as it was when you first got it up and running. Link to comment Share on other sites More sharing options...
cr38g Posted August 19, 2022 Author Share Posted August 19, 2022 When I enter the service --start-all command, I cannot see the C2 service on the list. I know I entered the command correctly for the C2 to be as a service on the server, but is not listed. Link to comment Share on other sites More sharing options...
dark_pyrro Posted August 19, 2022 Share Posted August 19, 2022 OK, what steps did you make to set up the C2 service (don't reveal/post any information that might identify you or your VPS)? What files have you created? How is the service file configured? Link to comment Share on other sites More sharing options...
cr38g Posted August 19, 2022 Author Share Posted August 19, 2022 As Hak5 episodes 2701 and 2702 with credit to Void-Byte sudo mv c2_community-linux-64 /usr/local/bin sudo mkdir /var/cloudc2 sudo mv c2.db /var/cloudc2/ sudo vi /etc/systemd/system/cloudc2.service [In unit] Description=Hak5 Cloud C2 After=cloudc2.service [Service] Type=idle ExecStart=/usr/local/bin/c2_community-linux-64 -hostname example.com -https -db /var/cloudc2/c2.db [Install] WantedBy=multi-user.target # Reload, enable on boot, start and inspect the newly created Cloud C2 service sudo systemctl daemon-reload sudo systemctl enable cloudc2.service sudo systemctl start cloudc2.service sudo systemctl status cloudc2.service Link to comment Share on other sites More sharing options...
cr38g Posted August 19, 2022 Author Share Posted August 19, 2022 Of course I change -hostname "example.com" with my Linode server. Link to comment Share on other sites More sharing options...
dark_pyrro Posted August 19, 2022 Share Posted August 19, 2022 So, what is the output of either sudo systemctl status cloudc2.service or sudo service cloudc2 status Link to comment Share on other sites More sharing options...
cr38g Posted August 19, 2022 Author Share Posted August 19, 2022 After going to directory: sudo vi /etc/systemd/system/cloudc2.service Results: But when I typed: Link to comment Share on other sites More sharing options...
dark_pyrro Posted August 19, 2022 Share Posted August 19, 2022 Yeah, that's the service definition/config file, but you need to run the commands I posted to get the current status of the service. That's the output that is interesting to see. Link to comment Share on other sites More sharing options...
cr38g Posted August 19, 2022 Author Share Posted August 19, 2022 I just type: sudo systemctl daemon-reload sudo systemctl enable cloudc2.service sudo systemctl start cloudc2.service sudo systemctl status cloudc2.service The service is back online. I think there is a problem with systemctl and Linode. it gave me a warning. I think that is why it does not restart the service when the system reboots. i will be posting the warning next time. Thank you very much for all your help. that is one of the reasons that I am glad that I found this forum and that I am using Linux. Our community it does care about its Noobs, 🙂 Link to comment Share on other sites More sharing options...
dark_pyrro Posted August 19, 2022 Share Posted August 19, 2022 OK, then something is clearly obstructing the service as it tries to start at boot time (my guess). Stopping and starting the service manually might give some clues to what is happening. One thing to think of is that the server needs internet access when C2 is started since it is validating the license at every single start. I can't think that this would be the case with Linode. It has at least never been a problem on my "production" AWS instance. For my Raspberry Pi test instance (that I run only for labs/testing and when trying to support other users), I have to include a delay though since the networking on my RPi isn't fully up when the C2 service is trying to validate the license. I'll just let the service sit and wait for about 30 seconds before starting the C2 service and it always works well as a workaround. Link to comment Share on other sites More sharing options...
cr38g Posted August 19, 2022 Author Share Posted August 19, 2022 Output: Got the C2 back online, but the Mark VII is offline. Maybe when I get to the site, I need to reboot it. I hope. 🙂 Link to comment Share on other sites More sharing options...
cr38g Posted August 19, 2022 Author Share Posted August 19, 2022 Warning: Link to comment Share on other sites More sharing options...
dark_pyrro Posted August 19, 2022 Share Posted August 19, 2022 It should get online if C2 is up. However, if there's some area I'm not that good at, it's the combo of C2 and the Mark VII specifically since I don't use the Mark VII with C2. I want access to the local web UI. Try a reboot of the Pineapple. If it's not working, then perhaps try to generate a new device.config file as a first troubleshooting step. Link to comment Share on other sites More sharing options...
cr38g Posted August 19, 2022 Author Share Posted August 19, 2022 It did not gave me the warning. I believe is because the service is already enabled, but the service is not listed. Weird, I can see my C2. Link to comment Share on other sites More sharing options...
cr38g Posted August 19, 2022 Author Share Posted August 19, 2022 Warning showed up after I stopped all services, then I typed: sudo systemctl enable cloudc2.service Link to comment Share on other sites More sharing options...
cr38g Posted August 19, 2022 Author Share Posted August 19, 2022 I will reboot when I get to the site. I will let you know of the outcome. Thank you for all your help. Good day! Link to comment Share on other sites More sharing options...
dark_pyrro Posted August 19, 2022 Share Posted August 19, 2022 You don't need to enable the service all the time. To list the service, don't use "service --status-all". Use "systemctl list-units" instead. Or, simply run the commands I posted before, to get the status of the C2 service specifically. sudo systemctl status cloudc2.service or sudo service cloudc2 status Link to comment Share on other sites More sharing options...
cr38g Posted August 19, 2022 Author Share Posted August 19, 2022 dark_pyrro, Thank you. Link to comment Share on other sites More sharing options...
cr38g Posted August 20, 2022 Author Share Posted August 20, 2022 Got to the site and reconnect the power. Everything is working now. Got the Mark VII online. Thanks, dark_pyrro. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.