Saturday 15 March 2014

security - Router blocking response from external networks -



security - Router blocking response from external networks -

i'm working on company network right now, , i've come across problem scripts cannot connect external networks. i'm wondering if knows mutual practices in network security may cause this?

ex. can visit www.example.com on firefox, python script timeout error if tries connect.

these scripts work fine on network or if alter url on local network.

import urllib.request f = urllib.request.urlopen('http://www.python.org/') print(f.read(300))

answer: browser uses network's proxy. scripts have utilize proxy run

import urllib.request proxy = urllib.request.proxyhandler({'http': '127.0.0.1'}) opener = urllib.request.build_opener(proxy) urllib.request.install_opener(opener) req = urllib.request.urlopen('http://www.google.com') print(req.read())

it browser configured utilize proxy. if true, need augment python script proxyhandler (see proxy urllib2)

security networking

No comments:

Post a Comment