容器技术交流

 找回密码
 立即注册
查看: 3578|回复: 4

怎么更换freebsd的ip以及dns啊?

[复制链接]
发表于 2009-5-4 10:02:52 | 显示全部楼层 |阅读模式
换了机房以后, 服务器ip以及dns和网关怎么更改啊??
用什么命令??
发表于 2009-5-4 10:26:37 | 显示全部楼层
ee /etc/rc.conf
更改里面的内容就行了
然后重启一下(还有别的方法,不用重启,但我忘了,呵...)
发表于 2009-5-4 11:32:24 | 显示全部楼层
ee /etc/resolv.conf
更换dns
发表于 2009-5-5 10:26:56 | 显示全部楼层
ifconfig 网卡 inet IP
好像是这样

DNS
在sysinstall 里改

菜鸟的方法
发表于 2009-9-13 22:25:40 | 显示全部楼层
ee /etc/rc.conf
#机器名字
hostname="adsl.zist.edu.cn"
ifconfig_re0="inet 192.168.0.X netmask 255.255.255.0"
# 或 用命令改 ifconfig re0 192.168.0.X netmask 255.255.255.0

存盘退出

设置DNS在/etc/resove.conf,如下:   
nameserver   202.96.128.X
nameserver   202.96.128.X

存盘退出

洞大要大家安全点就重启吧!不安全方法如下:

/etc/netstart  #重启网卡

/etc/init.d/networking restart  #重启网络 ssh不能运行

ifconfig re0 down  # 关闭网卡
ifconfig re0 up  # 开启网卡
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Archiver|URLOS ( 粤ICP备18087780号 )

GMT+8, 2025-7-10 01:18 , Processed in 0.027998 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表