privoxyを介してVPNに接続する

privoxyを介してVPNに接続する

次のパターンに従ってインターネットへの匿名接続を設定します。

ISP - > Privoxy(TORに関連付けられている) - > OpenVPNネットワーク(例:VPNGate) - >インターネット

私はより大きな匿名性を得たいと思います。次の.ovpnクライアントファイルを設定しました。

###############################################################################
# OpenVPN 2.0 Sample Configuration File
# for PacketiX VPN / SoftEther VPN Server
# 
# !!! AUTO-GENERATED BY SOFTETHER VPN SERVER MANAGEMENT TOOL !!!
# 
# !!! YOU HAVE TO REVIEW IT BEFORE USE AND MODIFY IT AS NECESSARY !!!
# 
# This configuration file is auto-generated. You might use this config file
# in order to connect to the PacketiX VPN / SoftEther VPN Server.
# However, before you try it, you should review the descriptions of the file
# to determine the necessity to modify to suitable for your real environment.
# If necessary, you have to modify a little adequately on the file.
# For example, the IP address or the hostname as a destination VPN Server
# should be confirmed.
# 
# Note that to use OpenVPN 2.0, you have to put the certification file of
# the destination VPN Server on the OpenVPN Client computer when you use this
# config file. Please refer the below descriptions carefully.


###############################################################################
# Specify the type of the layer of the VPN connection.
# 
# To connect to the VPN Server as a "Remote-Access VPN Client PC",
#  specify 'dev tun'. (Layer-3 IP Routing Mode)
#
# To connect to the VPN Server as a bridging equipment of "Site-to-Site VPN",
#  specify 'dev tap'. (Layer-2 Ethernet Bridgine Mode)

dev tun


###############################################################################
# Specify the underlying protocol beyond the Internet.
# Note that this setting must be correspond with the listening setting on
# the VPN Server.
# 
# Specify either 'proto tcp' or 'proto udp'.

proto tcp


###############################################################################
# The destination hostname / IP address, and port number of
# the target VPN Server.
# 
# You have to specify as 'remote <HOSTNAME> <PORT>'. You can also
# specify the IP address instead of the hostname.
# 
# Note that the auto-generated below hostname are a "auto-detected
# IP address" of the VPN Server. You have to confirm the correctness
# beforehand.
# 
# When you want to connect to the VPN Server by using TCP protocol,
# the port number of the destination TCP port should be same as one of
# the available TCP listeners on the VPN Server.
# 
# When you use UDP protocol, the port number must same as the configuration
# setting of "OpenVPN Server Compatible Function" on the VPN Server.

remote vpn400102047.opengw.net 1679


###############################################################################
# The HTTP/HTTPS proxy setting.
# 
# Only if you have to use the Internet via a proxy, uncomment the below
# two lines and specify the proxy address and the port number.
# In the case of using proxy-authentication, refer the OpenVPN manual.

;http-proxy-retry
;http-proxy [proxy server] [proxy port]
http-proxy-retry
http-proxy 127.0.0.1 8118

###############################################################################
# The encryption and authentication algorithm.
# 
# Default setting is good. Modify it as you prefer.
# When you specify an unsupported algorithm, the error will occur.
# 
# The supported algorithms are as follows:
#  cipher: [NULL-CIPHER] NULL AES-128-CBC AES-192-CBC AES-256-CBC BF-CBC
#          CAST-CBC CAST5-CBC DES-CBC DES-EDE-CBC DES-EDE3-CBC DESX-CBC
#          RC2-40-CBC RC2-64-CBC RC2-CBC
#  auth:   SHA SHA1 MD5 MD4 RMD160

cipher AES-128-CBC
auth SHA1


###############################################################################
# Other parameters necessary to connect to the VPN Server.
# 
# It is not recommended to modify it unless you have a particular need.

resolv-retry infinite
nobind
persist-key
persist-tun
client
verb 3
#auth-user-pass

###############################################################################
# The certificate file of the destination VPN Server.
# 
# The CA certificate file is embedded in the inline format.
# You can replace this CA contents if necessary.
# Please note that if the server certificate is not a self-signed, you have to
# specify the signer's root certificate (CA) here.

<ca>
-----BEGIN CERTIFICATE-----
MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCB
hTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNV
BAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTAwMTE5
MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0IxGzAZBgNVBAgT
EkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG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EBsqpIt6xf4FpuHA1sj+nq6PK7o9mfjYcwlYRm6mnPTXJ9OV
2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSgtZx8jb8uk2Intzna
FxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwWsRqZ
CuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiK
boHGhfKppC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmcke
jkk9u+UJueBPSZI9FoJAzMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yL
S0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHqZJx64SIDqZxubw5lT2yHh17zbqD5daWb
QOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk527RH89elWsn2/x20Kk4yl
0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7ILaZRfyHB
NVOFBkpdn627G190
-----END CERTIFICATE-----

</ca>


###############################################################################
# The client certificate file (dummy).
# 
# In some implementations of OpenVPN Client software
# (for example: OpenVPN Client for iOS),
# a pair of client certificate and private key must be included on the
# configuration file due to the limitation of the client.
# So this sample configuration file has a dummy pair of client certificate
# and private key as follows.

<cert>
-----BEGIN CERTIFICATE-----
MIICxjCCAa4CAQAwDQYJKoZIhvcNAQEFBQAwKTEaMBgGA1UEAxMRVlBOR2F0ZUNs
aWVudENlcnQxCzAJBgNVBAYTAkpQMB4XDTEzMDIxMTAzNDk0OVoXDTM3MDExOTAz
MTQwN1owKTEaMBgGA1UEAxMRVlBOR2F0ZUNsaWVudENlcnQxCzAJBgNVBAYTAkpQ
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5h2lgQQYUjwoKYJbzVZA
5VcIGd5otPc/qZRMt0KItCFA0s9RwReNVa9fDRFLRBhcITOlv3FBc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gMZaU/u6t0V95+YezPNCQZB
wmE9Mmlbq1emDeROivjCfoGhR3kZXW1pTKlLh6ZMUQUOpptdXva8XxfoqQwa3enA
M7muBbF0XN7VO80iJPv+PmIZdEIAkpwKfi201YB+BafCIuGxIF50Vg==
-----END RSA PRIVATE KEY-----

</key>

出力sudo openvpn --config '/home/hubot/Documents/vpngate_vpn400102047.opengw.net_tcp_1679.ovpn'

Sun Jun 11 19:29:55 2017 DEPRECATED OPTION: http-proxy-retry and socks-proxy-retry: In OpenVPN 2.4 proxy connection retries are handled like regular connections. Use connect-retry-max 1 to get a similar behavior as before.
Sun Jun 11 19:29:55 2017 OpenVPN 2.4.0 [git:master/d73f7253d939e293+] x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 22 2017
Sun Jun 11 19:29:55 2017 library versions: OpenSSL 1.0.2l  25 May 2017, LZO 2.08
Sun Jun 11 19:29:55 2017 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Sun Jun 11 19:29:55 2017 TCP/UDP: Preserving recently used remote address: [AF_INET]127.0.0.1:8118
Sun Jun 11 19:29:55 2017 Socket Buffers: R=[87380->87380] S=[16384->16384]
Sun Jun 11 19:29:55 2017 Attempting to establish TCP connection with [AF_INET]127.0.0.1:8118 [nonblock]
Sun Jun 11 19:29:55 2017 TCP connection established with [AF_INET]127.0.0.1:8118
Sun Jun 11 19:29:55 2017 Send to HTTP proxy: 'CONNECT vpn400102047.opengw.net:1679 HTTP/1.0'
Sun Jun 11 19:29:55 2017 Send to HTTP proxy: 'Host: vpn400102047.opengw.net'
Sun Jun 11 19:30:01 2017 HTTP proxy returned: 'HTTP/1.1 200 Connection established'
Sun Jun 11 19:30:03 2017 TCP_CLIENT link local: (not bound)
Sun Jun 11 19:30:03 2017 TCP_CLIENT link remote: [AF_INET]127.0.0.1:8118
Sun Jun 11 19:30:04 2017 TLS: Initial packet from [AF_INET]127.0.0.1:8118, sid=734a1e22 9cf9a6ba
Sun Jun 11 19:30:11 2017 VERIFY OK: depth=2, C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO RSA Certification Authority
Sun Jun 11 19:30:11 2017 VERIFY OK: depth=1, C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO RSA Domain Validation Secure Server CA
Sun Jun 11 19:30:11 2017 VERIFY OK: depth=0, OU=Domain Control Validated, OU=PositiveSSL Wildcard, CN=*.opengw.net
Sun Jun 11 19:30:18 2017 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Sun Jun 11 19:30:18 2017 [*.opengw.net] Peer Connection Initiated with [AF_INET]127.0.0.1:8118
Sun Jun 11 19:30:19 2017 SENT CONTROL [*.opengw.net]: 'PUSH_REQUEST' (status=1)
Sun Jun 11 19:30:24 2017 SENT CONTROL [*.opengw.net]: 'PUSH_REQUEST' (status=1)
Sun Jun 11 19:30:29 2017 SENT CONTROL [*.opengw.net]: 'PUSH_REQUEST' (status=1)
Sun Jun 11 19:30:30 2017 PUSH: Received control message: 'PUSH_REPLY,ping 3,ping-restart 10,ifconfig 10.211.1.13 10.211.1.14,dhcp-option DNS 10.211.254.254,dhcp-option DNS 8.8.8.8,route-gateway 10.211.1.14,redirect-gateway def1'
Sun Jun 11 19:30:30 2017 OPTIONS IMPORT: timers and/or timeouts modified
Sun Jun 11 19:30:30 2017 OPTIONS IMPORT: --ifconfig/up options modified
Sun Jun 11 19:30:30 2017 OPTIONS IMPORT: route options modified
Sun Jun 11 19:30:30 2017 OPTIONS IMPORT: route-related options modified
Sun Jun 11 19:30:30 2017 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Sun Jun 11 19:30:30 2017 Data Channel Encrypt: Cipher 'AES-128-CBC' initialized with 128 bit key
Sun Jun 11 19:30:30 2017 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Sun Jun 11 19:30:30 2017 Data Channel Decrypt: Cipher 'AES-128-CBC' initialized with 128 bit key
Sun Jun 11 19:30:30 2017 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Sun Jun 11 19:30:30 2017 ROUTE_GATEWAY 192.168.1.254/255.255.255.0 IFACE=wlp2s0 HWADDR=58:fb:84:6f:03:38
Sun Jun 11 19:30:30 2017 TUN/TAP device tun0 opened
Sun Jun 11 19:30:30 2017 TUN/TAP TX queue length set to 100
Sun Jun 11 19:30:30 2017 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Sun Jun 11 19:30:30 2017 /sbin/ip link set dev tun0 up mtu 1500
Sun Jun 11 19:30:30 2017 /sbin/ip addr add dev tun0 local 10.211.1.13 peer 10.211.1.14
Sun Jun 11 19:30:30 2017 /sbin/ip route add 127.0.0.1/32 via 192.168.1.254
Sun Jun 11 19:30:30 2017 /sbin/ip route add 0.0.0.0/1 via 10.211.1.14
Sun Jun 11 19:30:30 2017 /sbin/ip route add 128.0.0.0/1 via 10.211.1.14
Sun Jun 11 19:30:30 2017 Initialization Sequence Completed
Sun Jun 11 19:30:41 2017 [*.opengw.net] Inactivity timeout (--ping-restart), restarting
Sun Jun 11 19:30:41 2017 SIGUSR1[soft,ping-restart] received, process restarting
Sun Jun 11 19:30:41 2017 Restart pause, 5 second(s)
Sun Jun 11 19:30:46 2017 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Sun Jun 11 19:30:46 2017 TCP/UDP: Preserving recently used remote address: [AF_INET]127.0.0.1:8118
Sun Jun 11 19:30:46 2017 Socket Buffers: R=[87380->87380] S=[16384->16384]
Sun Jun 11 19:30:46 2017 Attempting to establish TCP connection with [AF_INET]127.0.0.1:8118 [nonblock]
Sun Jun 11 19:30:46 2017 TCP connection established with [AF_INET]127.0.0.1:8118
Sun Jun 11 19:30:46 2017 Send to HTTP proxy: 'CONNECT vpn400102047.opengw.net:1679 HTTP/1.0'
Sun Jun 11 19:30:46 2017 Send to HTTP proxy: 'Host: vpn400102047.opengw.net'
^CSun Jun 11 19:30:59 2017 /sbin/ip route del 127.0.0.1/32
Sun Jun 11 19:30:59 2017 /sbin/ip route del 0.0.0.0/1
Sun Jun 11 19:30:59 2017 /sbin/ip route del 128.0.0.0/1
Sun Jun 11 19:30:59 2017 Closing TUN/TAP interface
Sun Jun 11 19:30:59 2017 /sbin/ip addr del dev tun0 local 10.211.1.13 peer 10.211.1.14
Sun Jun 11 19:30:59 2017 SIGINT[hard,init_instance] received, process exiting

次のエラーが発生します。

Sun Jun 11 19:30:41 2017 [*.opengw.net] Inactivity timeout (--ping-restart), restarting
    Sun Jun 11 19:30:41 2017 SIGUSR1[soft,ping-restart] received, process restarting
    Sun Jun 11 19:30:41 2017 Restart pause, 5 second(s)

そしてprivoxyを介してVPNに接続することはできません。誰が私を助けることができますか?

関連情報