Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I need to issue a HTTP request from the command line, but am behind a Forefront TMG Proxy. The environment variable http_proxy doesn't work.

I still get the error:

ERROR 407: Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  ).

I have no GUI (no X) on this PC.

How can I make a simple http request and bypass this proxy?

share|improve this question

1 Answer 1

For having authentication with wget you can use:

wget --proxy-user=user --proxy-password=pass http//someurl.com/file

If you want to set this as variable in the profile use:

export http_proxy="http://username:password@proxy.domain:8080"

Those are all you need. Of course, you should have a username:password for this proxy.

You could add the last line to your ~/.bashrc or ~/.profile or any script that executes at starting a prompt. If you want only wget knowing of this, you should modify ~/.wgetrc (only for the user) or /etc/wgetrc (globally for all the users) and add:

proxy_password = pass
proxy_user = user
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.