-
Notifications
You must be signed in to change notification settings - Fork 4
VPCとvyattaでiPhoneからWebProxyを使ってみる
mechamogera edited this page Sep 26, 2012
·
1 revision
- iPhoneの3G回線でWebProxyが利用できないのでAWSのVPCとvyattaを使ってVPN接続してWebProxyを利用することを試してみた
- VPCを作成する
- VPC with a Single Public Subnet Onlyでデフォルト設定にした
- Public Subnet: 10.0.0.0/24
- EC2インスタンスを作成する
- AMIはCommunity AMIsからvyatteで検索して一番新しいバージョンのものを選択
- 実験時はami-0079c901:407613804811/Vyatta Core 6.4 rev.5を使用
- Security Groupは以下のポートを開放
- 22 (ssh用)
- 47 (vpn用)
- 1723 (vpn用)
- 8080 (web proxy用)
- インスタンスにEIPを割り当て
- private IPを10.0.0.10で固定
- 共通設定
- ログイン後(vyattaユーザ)以下を実行
$ configure
$ set system name-server 8.8.8.8
$ set system name-server 8.8.4.4
$ set system time-zone Asia/Tokyo
$ set system ntp server ntp.nict.jp
$ commit
$ save
- vpn設定
$ set vpn pptp remote-access outside-address 10.0.0.10
$ set vpn pptp remote-access client-ip-pool start 10.0.0.200
$ set vpn pptp remote-access client-ip-pool stop 10.0.0.210
$ set vpn pptp remote-access dns-servers server-1 8.8.8.8
$ set vpn pptp remote-access dns-servers server-2 8.8.4.4
$ set vpn pptp remote-access authentication mode local
$ set vpn pptp remote-access authentication local-users username hoge password moge
$ commit
$ save
- web proxy設定
$ set service webproxy listen-address 10.0.0.10
$ set service webproxy listen-address 10.0.0.10 disable-transparent
$ set service webproxy default-port 8080
$ commit
$ save
- iphoneからの接続確認
- iphone(iOS 6.0で確認)の「設定」=>「一般」=>「VPN」=>「VPN構成を追加」のPPTPで以下の設定を追加
- サーバ:[EIPのアドレス]
- アカウント:hoge
- パスワード:moge
- プロキシ:手動
- プロキシのサーバ:10.0.0.10
- プロキシのポート:8080
- 「設定」=>「一般」=>「VPN」=>上記で作成した設定をチェックして「VPN」をオンに
- => 接続 OK
- => 「設定」=>「一般」=>「VPN」=>「状況」を確認するとIPに10.0.0.200が割り振られている
- iphoneのsafariから適当にwebサイトを見てみる
- => 閲覧OK
- => 確認くん(VIA the UGTOP)で確認すると現在接続されている場所がEIPのアドレスになっている