The DNS problem which was an natd problem
2009-05-13 13:16:56来源:未知 阅读 ()
By this time, I'd been down and now I was getting up again. After nearly trashing the entire system, only to have placed gently back into my hands by a total stranger, I was ready to tackle the other problem. That was my DNS problem. Or what I, as a novice, thought was a DNS problem. It turned out not to be a routing problem. For information on DNS, see
Getting local names to resolve
.
The symptoms were pings that worked everywhere on my subnet, but I could only ping out from the FreeBSD box. This was confusing. Again, the folks on efnet #freebsd asked me the right questions.
The first thing was to get natd running in verbose mode. So I issued the following commands:
killall natd
natd
-v interface ed0
I then started up NT2 and connected the FreeBSD box up to my ISP. Then I used NT1 to dial up my ISP via modem. This way I could still chat on IRC and debug my firewall. And I could use NT2 to verify that things were going right.
SOAB! It worked. How come? All we had done was restart natd. The next step was to reboot the machine and try again. It didn't work. So I stopped and restarted natd. It worked. IRC server connections from NT1 and NT2 worked. Something was very weird.
At the end of /etc/rc.local was the following (NOTE: /etc/rc.local is deprecated; use /usr/local/etc/rc.d/ instead; see
Starting stuff at boot time
and
Installing IP Filter 3.3.3
for an example):
natd -interface ed0
dhclient ed0
ifconfig ed1 inet 10.0.0.10 255.255.255.0
I started reading up on natd (please, no laughing). I found the -dynamic flag, which I had not been previously using. So I added it to the command and rebooted.
Shutdown now!
It was about this time that I was introduced to the
shutdown
command. This lovely command has some nice side-effect. Instead of rebooting, you can just restart the system. As root (or as a super user [su]), issue the shutdown now command. When you get back to to prompt in single user mode, type control-D. The system will restart. A great time saver.
DNS solved
After several tests, I concluded that the problem is solved by having:
natd -dynamic -interface ed0
For some reason, as yet unexplained to me, the dynamic flag is now needed for natd.
FWIW: I changed the /etc/rc.local file to contain (NOTE: /etc/rc.local is deprecated; use /usr/local/etc/rc.d/ instead; see
Starting stuff at boot time
and
Installing IP Filter 3.3.3
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- Freebsd oracle 10g 2009-05-13
- KDE/FreeBSD 测试 QT-4.5.1. 2009-05-13
- OpenBSD 4.5下安装Gnome 2.24成功! 2009-05-13
- OpenBSD 4.5 2009-05-13
- DragonFly BSD 2.2.1发布 2009-05-13
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash