Proxy configuration

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
villex46
OpenVpn Newbie
Posts: 4
Joined: Thu Dec 10, 2009 3:34 pm

Proxy configuration

Post by villex46 » Thu Dec 10, 2009 3:42 pm

Hello,

We have a problem with proxy settings. I try to configure http-proxy "http-proxy 192.168.0.2 80" but can not connect, I have the error "connecting to client has failed " and log show: "Options error: - http-proxy MUST be used in TCP Client mode (ie - proto tcp-client)
Use - help for more information
."

How can I configure the proxy right?

Thanks,

User avatar
ecrist
Forum Team
Posts: 237
Joined: Wed Nov 26, 2008 10:33 pm
Location: Northern Minnesota, USA
Contact:

Re: Proxy configuration

Post by ecrist » Wed Dec 16, 2009 2:26 pm

Without your configs, it's hard to say, exactly, but I'd start by doing what the error says to. My guess is you're using UDP. Change to TCP and you should be fine.
OpenVPN Community Administrator
IRC: #openvpn, #openvpn-devel
Co-Author of Mastering OpenVPN
Author of Troubleshooting OpenVPN

villex46
OpenVpn Newbie
Posts: 4
Joined: Thu Dec 10, 2009 3:34 pm

Re: Proxy configuration

Post by villex46 » Wed Dec 16, 2009 2:42 pm

client

;dev tap
dev tun

;dev-node MyTap

;proto tcp
proto udp


remote xxx.xxx.xxx.xxx 1194
;remote my-server-2 1194

;remote-random

resolv-retry infinite

nobind

;user nobody
;group nobody

persist-key
persist-tun

;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]
http-proxy [xxx.xxx.xxx.xxx] [80]

;mute-replay-warnings

ca ca.crt
cert effico.spain.crt
key effico.spain.key
;ns-cert-type server

;tls-auth ta.key 1

;cipher x

comp-lzo

verb 3

;mute 20

villex46
OpenVpn Newbie
Posts: 4
Joined: Thu Dec 10, 2009 3:34 pm

Re: Proxy configuration

Post by villex46 » Wed Dec 16, 2009 2:46 pm

Hi,

Thanks for the answer.

I attachment my config.

How to change to TCP?

Thanks,

villex46
OpenVpn Newbie
Posts: 4
Joined: Thu Dec 10, 2009 3:34 pm

Re: Proxy configuration

Post by villex46 » Thu Dec 17, 2009 3:35 pm

Hi,

I change to "proto TCP" and I have a diferent error.

Thu Dec 17 16:03:28 2009 HTTP proxy returned: 'HTTP/1.1 502 Proxy Error ( Connection refused )'
Thu Dec 17 16:03:28 2009 HTTP proxy returned bad status
Thu Dec 17 16:03:28 2009 TCP/UDP: Closing socket
Thu Dec 17 16:03:28 2009 SIGTERM[soft,init_instance] received, process exiting


I analyzed packets sent with software wireshark and show:
IP_Source IP_Destination TCP 52187 > openvpn [SYN] Seq=0 Win=65535 Len=0 MSS=1460

IP_Destination IP_Source TCP openvpn > 52187 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0


Can I blocked some port?
What I have to open ports in the firewall?

Thanks for all,

User avatar
krzee
Forum Team
Posts: 728
Joined: Fri Aug 29, 2008 5:42 pm

Re: Proxy configuration

Post by krzee » Sun Dec 20, 2009 11:44 pm

[quote="villex46"]Hi,

I change to "proto TCP" and I have a diferent error.

Thu Dec 17 16:03:28 2009 HTTP proxy returned: 'HTTP/1.1 502 Proxy Error ( Connection refused )'

Your proxy is not allowing the connection. Either you do not have it running, or you have a firewall blocking you. This is not very much openvpn related but rather related to your proxy and general networking. get your proxy working on the ip:port openvpn reaches it at via your web browser, then bring openvpn into the mix.

Post Reply