Advertisement
C0BRA

Virgin Media Fix DMZ

Nov 23rd, 2012
532
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.57 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # The following fixes Virgin Media's router not saving settings, put in crontab to execute periodically (# crontab -e)
  4.  
  5. # setup wget to use cookies
  6. alias wget="wget --delete-after --keep-session-cookies --save-cookies=.router_cookie.txt"
  7.  
  8. # login
  9. wget --post-data="VmLoginUsername=admin&VmLoginPassword=password&VmLoginErrorCode=0&VmChangePasswordHint=0" http://192.168.0.1/goform/VmLogin
  10.  
  11. # set dmz
  12. wget --post-data="VmDmzSupport=0x1&VmDmzHostIP3=22&VmDmzRestore=0" http://192.168.0.1/goform/VmRgDmzHost
  13.  
  14. # logout
  15. wget http://192.168.0.1/VmLogout.html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement