【已解决】可以ping通无法通过浏览器浏览该网站

原文地址:http://stackoverflow.com/questions/21432620/how-to-setup-static-ip-in-fedora-19


First find out your interface using ifconfig

Edit the config file for that interfaceusing your favorite text editor:

vi /etc/sysconfig/network-scripts/ifcfg-eth1 //where eth1 is your interface

You will need to change BOOTPROTO from dhcp to static and add IPADDR, NETMASK, BROADCAST and NETWORK variables.

NM_CONTROLLED="yes"
BOOTPROTO=static
DEVICE=eth1
ONBOOT=yes
IPADDR=192.168.8.248
NETMASK=255.255.255.0
BROADCAST=192.168.8.255
NETWORK=192.168.8.0
GATEWAY=192.168.8.1
TYPE=Ethernet
PEERDNS=no

Save the file with ESC, then

:w !sudo tee % > /dev/null

Restart your network via

/etc/init.d/network restart

Also add your DNS servers

vi /etc/resolv.conf

nameserver your_Router_ip
nameserver 8.8.8.8 # Google's DNS Server

You are ready to browse!


IF YOU CANNOT BROWSE STILL AFTER TRYING THE METHOD MENTIONED ABOVE...LOOK AT THE BELOW SOLUTION!!!!


Since I'm using Redhat 6.6, I still cannot browse via my own browser Firefox. Then I searched some more materials.

Most comments are related to the Firewall. Then I switch to the firewall side. Due to I have not a lot of knowledge about the firewall. I decided to use the GUI.

Computer->Control Center->Firewall. I checked the service WWW/HTTP 80 ports are unchecked. Then I checked this option. and then input the destination IP address into the firefox browser address bar again, Whooray!!! It does work!


SO HAPPY!!!!





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值