Jump to content

'https' and 'reverseProxy' parameters do not found


GN_82
 Share

Recommended Posts

Hi guys :-)

When I try to run C2 behind an Nginx the 'reverseProxy' parameter causes the C2 server do not response.

c2 -debug -hostname myc2.domain.local -https -certFile /app/certs/cert.crt -keyFile /app/certs/cert.key -reverseProxy -reverseProxyPort 8443 -sshport 3020

 

curl -kv https://myc2.domain.local:8443
Server error 502 <--

If I remove the 'https' parameter the C2 server works, but the pineapple mk7 devices do not use HTTPS to communicate with the server.

Link to comment
Share on other sites

I have identified the problem.

If parameters 'reverseProxy' and 'reverseProxyPort' are used, the server does not initialize in https mode.

c2 -debug -hostname x.x.x.x -https -certFile /app/cert.crt -keyFile /app/cert.key -sshport 23644 -reverseProxy -reverseProxyPort 23644 -listenip 127.0.0.1

 

root@d244bb0d9c1b:/app# netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN
...

It is necessary that the https and reverseProxy mode are compatible, so that when downloading the 'device.config' file the proxy port is configured correctly.

Edited by GN_82
Link to comment
Share on other sites

I think it is not possible to modify the 'device.config' file manually because there is some kind of integrity check. For this reason it is necessary to use the 'reverseProxyPort' parameter, so that the port is defined at the C2 server level.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...