此文章引用: ubuntu 14.04网卡配置以及关闭防火墙 - wclwcw - 博客园
防火墙,不关闭,会引起,mount: RPC: remote system error - no route to host
的问题,
当时在虚拟机调试,Ubuntu14.04的时候,遇到,NFS,挂在失败,mount的时候,提示:remote system error - no route to host,
查看了很多文章,确认,是由于防火墙,的iptables 规则,引起的,关闭防火墙,就,解决了NFS,挂在,提示:remote system error - no route to host 的问题。
希望,对遇到此问题的朋友们,有所帮助!
原文如下:
一、Ubuntu网卡配置如下:
在文件/etc/network/interfaces中进行以下配置
auto lo
iface lo inet lookback
auto eth0
iface eth0 inet static
address 192.168.1.150
netmask 255.255.255.0
gateway 192.168.1.1
network 192.168.0.0
broadcast 192.168.1.255
在/etc/resolv.conf 添加dns
nameserver 114.114.114.114
完成以上配置后,需要重启网卡,重启方式(如果其中一种方式不可以,请尝试另外一种)
1、sudo /etc/init.d/networking restart
2、sudo ifconfig eth0 down
sudo ifconfig eth1 up
3、sudo ifdown eth0
sudo ifup eth0
二、防火墙
1、Ubuntu14.0.4开启
ufw enable
2、Ubuntu14.0.4关闭
ufw disable
3、卸载iptables
apt-get remove iptables
4、关闭Ubuntu14.0.4的iptables的相关命令
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -F