MatiasPL

Untitled

Jan 15th, 2016
470
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. How to enable DMZ on HiLink modems with crippled UI (ie. PlusGSM), to enable public IP access
  2. (if you paid for it in the first place of course :) )
  3.  
  4. curl -X GET http://192.168.8.1/api/webserver/SesTokInfo
  5.  
  6. The response will be similar to the following:
  7. <?xml version="1.0" encoding="UTF-8"?>
  8. <response>
  9. <SesInfo>SessionID=n2YhsMuKk1RgoEyoQO8QFXmCtDU0523wHFgB9fNa0otYlEtBgAGukqya+PxMbi/rmPYP4hn53pZ5udhoOMbV2kMMVzCWhg/3jz3DiGFkQCJLrp318O8ZD0YBX5jy006O</SesInfo>
  10. <TokInfo>ginix1KzeO2bptUatvN+VEny6qjj53k7</TokInfo>
  11. </response>
  12.  
  13. Take SessInfo and TokInfo and do:
  14.  
  15. curl -X GET http://192.168.8.1/api/security/dmz -H "Cookie: SessInfo-value"
  16.  
  17. You most likely will see something like this:
  18. <?xml version="1.0" encoding="UTF-8"?>
  19. <response>
  20. <DmzStatus>0</DmzStatus>
  21. <DmzIPAddress>192.168.8.100</DmzIPAddress>
  22. </response>
  23.  
  24. So we need to alter DmzStatus and set it to 1:
  25.  
  26. curl -X POST -d "<request><DmzStatus>1</DmzStatus><DmzIPAddress>192.168.8.100</DmzIPAddress></request>" http://192.168.8.1/api/security/dmz -H "Cookie: SessInfo-value" -H "__RequestVerificationToken: TokInfo-value"
  27.  
  28. PS. Mind the space after "Cookie:".
RAW Paste Data