A-A+

亚马逊云介绍(2):使用AWS EC2搭建pptpd服务器

2014年07月01日 服务器 评论 37 条 阅读 25,730 次

AWS提供了免费一年的服务,所以注册一个耍耍。注册教程:亚马逊云介绍(1):注册AWS并申请免费一年的使用

下面来介绍下使用亚马逊云如何翻墙。云服务器使用的操作系统为ubuntu 14.04。

  1. 使用Putty连接到EC2实例;
  2. 安装pptp守护:
    sudo aptitude install pptpd
  3. 编辑pptp配置文件:sudo vim /etc/pptpd.conf在最后一行加上以下代码:localip 192.168.240.1
    remoteip 192.168.240.2-9
  4. 使用Google Public DNS:sudo vim /etc/ppp/pptpd-options找到包含ms-dns,去掉注释,并修改如下:ms-dns 8.8.8.8
    ms-dns 8.8.4.4
  5. 配置访问pptpd的用户名和密码,将USERNAME和PASSWORD替换为你自己希望的。可以重复添加,分配给不同的用户::echo "USERNAME pptpd PASSWORD *" | sudo tee -a /etc/ppp/chap-secrets
  6. 重启服务:sudo /etc/init.d/pptpd restart
  7. 已经可以连接到pptp,下面配置数据转发。
    编辑/etc/sysctl.confsudo vim /etc/sysctl.conf将下面一行的注释去掉net.ipv4.ip_forward=1重新加载sudo sysctl -p
  8. 网络地址转换sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
  9. 确保服务器重启后服务可用:sudo vim /etc/rc.local在exit 0上面加一行iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
  10. 在EC2控制台将实例的Security Groups中添加新规则将规则中的inbound和outbound都设置为下图所示。并将这条规则启用。

QQ截图20140701180121            经测试,访问YouTube看1080P的高清速度非常快,一点也不卡。

37 条留言  访客:0 条  博主:0 条   引用: 2 条


    Warning: A non-numeric value encountered in /data/wwwroot/lxy.me/wp-content/themes/Ality/inc/functions/comment-template.php on line 16
  1. avatar a

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
    • avatar 恋香缘

      Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
      • avatar 西西的东东

        Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
        • avatar 恋香缘

          Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
      • avatar xiantiger

        Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
  2. avatar xm

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
  3. avatar 赵浪

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
    • avatar 恋香缘

      Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
      • avatar 赵浪

        Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
  4. avatar 赵浪

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
  5. avatar 赵浪

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
    • avatar 恋香缘

      Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
      • avatar 赵浪

        Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
        • avatar 恋香缘

          Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
          • avatar 赵浪

            Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
          • avatar 赵浪

            Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
          • avatar 赵浪

            Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
        • avatar 恋香缘

          Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
    • avatar michaelsdj

      Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
  6. avatar jtdonkey

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
    • avatar 恋香缘

      Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
  7. avatar jtdonkey

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
    • avatar 恋香缘

      Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
  8. avatar jtdonkey

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
  9. avatar jtdonkey

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
  10. avatar jtdonkey

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
    • avatar windbell

      Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
  11. avatar clarence

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
  12. avatar yiwei

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
  13. avatar 菜鸟

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
  14. avatar 菜鸟

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
  15. avatar michaelsdj

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
  16. avatar ly

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
  17. avatar 新手

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249
  18. avatar yulin

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /data/wwwroot/lxy.me/wp-content/themes/Ality/functions.php on line 249

来自外部的引用: 2 条

  • 亚马逊云介绍(1):注册AWS并申请免费一年的使用 | 恋香缘
  • 搭建pptp vpn – mikko's blog

给我留言