分类存档: 穷折腾

Setting DNS in Ubuntu and chattr

Setting DNS in Ubuntu

As has been mentioned here on several occasions using Google’s Open DNS servers is a much better solution than using the DNS server provided by your ISP.

This is how to change your DNS setting in Ubuntu to use said Google DNS server using gedit as a text editor(substitute your editor of choice where gedit is used):

In a terminal:

sudo gedit /etc/resolve.conf

In order to use the Google DNS you will need to add two entries into the file as such:

nameserver 8.8.8.8
nameserver 8.8.4.4

Save the file

Now the only problem is the next time you reboot or restart your networking interface(s) your DNS servers will be reset by the system to use the settings given by the DHCP server. Since this is counter-productive to the task at hand we will write-protect the resolve.conf file using the following command in terminal

sudo chattr +i /etc/resolv.conf

This gives your resolv.conf file an immutable file attribute preventing anything from modifying it.
In turn if you ever decide you would like to change DNS servers again remember to use the following command before attempting to edit the file again:

sudo chattr -i /etc/resolv.conf

Firefox 用SSH代理浏览 Facebook Twitter

发现用同样的代理配置,其他浏览器正常工作,偏偏就 Firefox 不能登录 Facebook 和 Twitter,而除这两个外其他墙外网站却都可以正常浏览。

Google了一圈,现总结如下:

  • Firefox地址栏输入 about:config;
  • 有安全提示,点击继续;
  • 找到“network.proxy.socks_remote_dns”,双击改为True(默认False);
  • 可能需要重启Firefox。
已验证可行。

EC2 + SSH 翻墙 3/3— SSH 翻墙设置

Amazon EC2上的Instance已经运行起来,就相当于你已经有了一台在墙外的电脑。接下来要做的,就是让你的本地电脑与这个远程的Instance通信,来帮你连通墙外的世界。主要通过两步来实现,SSH配置,浏览器配置。

对于SSH配置,要区分Windows用户和Linux用户。

继续阅读 »

EC2 + SSH 翻墙 2/3— EC2 instance 建立

回到aws首页:http://aws.amazon.com/

进入AWS控制台,如下图:

继续阅读 »

EC2 + SSH 翻墙 1/3— Amazon AWS 帐户注册

Amazon的EC2 服务相当于远程虚拟主机。新注册用户一年内有一定的免费使用额度,本文正是基于此来穷折腾的。 继续阅读 »