Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urllib2.HTTPError: HTTP Error 403: Forbidden #22

Open
CluelessTechnologist opened this issue May 21, 2019 · 2 comments
Open

urllib2.HTTPError: HTTP Error 403: Forbidden #22

CluelessTechnologist opened this issue May 21, 2019 · 2 comments

Comments

@CluelessTechnologist
Copy link

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
Copy link

mlazzje commented Jun 5, 2019

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
Copy link

xattack commented Jun 6, 2019

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//issues/7] the solution was set up the shrew-soft client with IKE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants