The DNS problem which was an natd problem

2009-05-13 13:16:56来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折


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
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:CD-ROM saga (a funny story)

下一篇:Firewalls, filtering, ipfw, and FTP clients