schlatterbeck / snxvpn

Command-line utility to connect to a Checkpoint SSL VPN
Other
66 stars 58 forks source link

urllib2.HTTPError: HTTP Error 403: Forbidden #22

Open CluelessTechnologist opened 5 years ago

CluelessTechnologist commented 5 years ago

I can't connect with snxconnect but on Windows it works.

kalle@lxtest2:~$ snxconnect -H host -U user Password: Traceback (most recent call last): File "/home/kalle/.local/bin/snxconnect", line 5, in <module> main () File "/home/kalle/.local/lib/python2.7/site-packages/snxconnect.py", line 522, in main result = rq.login () File "/home/kalle/.local/lib/python2.7/site-packages/snxconnect.py", line 171, in login self.open () File "/home/kalle/.local/lib/python2.7/site-packages/snxconnect.py", line 249, in open self.f = f = self.opener.open (rq, timeout = 10) File "/usr/lib/python2.7/urllib2.py", line 435, in open response = meth(req, response) File "/usr/lib/python2.7/urllib2.py", line 548, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python2.7/urllib2.py", line 473, in error return self._call_chain(*args) File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 403: Forbidden

mlazzje commented 5 years ago

Same issue on Fedora:

[test@test]~% snxconnect -H hostname -U user
Password: Traceback (most recent call last): File "/usr/local/bin/snxconnect", line 5, in main () File "/usr/local/lib/python3.7/site-packages/snxconnect.py", line 522, in main result = rq.login () File "/usr/local/lib/python3.7/site-packages/snxconnect.py", line 171, in login self.open () File "/usr/local/lib/python3.7/site-packages/snxconnect.py", line 249, in open self.f = f = self.opener.open (rq, timeout = 10) File "/usr/lib64/python3.7/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib64/python3.7/urllib/request.py", line 641, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib64/python3.7/urllib/request.py", line 569, in error return self._call_chain(args) File "/usr/lib64/python3.7/urllib/request.py", line 503, in _call_chain result = func(args) File "/usr/lib64/python3.7/urllib/request.py", line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: Forbidden

xattack commented 5 years ago

On Linux Mint 19 x64 ,when using snxconnect 1.2 with the options -H -U -P -SC we got http error 403 . I installed it using pip install snxvpn u sing python2.7 . snx version is 7075 and it works fine with other endpoint server

~# snx --version snx: invalid option -- '-' Check Point's Linux SNX build 800007075

I have not been able to find any work around for this issue. It is extremely annoying. According with another forum it could be related with how urllib2 manage headers , tried to put it hardcoded but with no result, since I'm not programmer. Hope you can help us

snxconnect -H hostname -U username -P password -SC Traceback (most recent call last): File "/usr/local/bin/snxconnect", line 5, in main () File "/usr/local/lib/python2.7/dist-packages/snxconnect.py", line 555, in main result = rq.login () File "/usr/local/lib/python2.7/dist-packages/snxconnect.py", line 184, in login self.open () File "/usr/local/lib/python2.7/dist-packages/snxconnect.py", line 271, in open self.f = f = self.opener.open (rq, timeout = 10) File "/usr/lib/python2.7/urllib2.py", line 435, in open response = meth(req, response) File "/usr/lib/python2.7/urllib2.py", line 548, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python2.7/urllib2.py", line 473, in error return self._call_chain(args) File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain result = func(args) File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 403: Forbidden

---UPDATE
I'm really embarrased ...my fault. It was a simple IPSec - ike v1 vpn connection , not a SSL . As commented in [https://github.com/schlatterbeck/snxvpn/issues/7] the solution was set up the shrew-soft client with IKE.