Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4174118
  • 博文数量: 601
  • 博客积分: 15410
  • 博客等级: 上将
  • 技术积分: 6884
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-16 08:11
个人简介

独学而无友,则孤陋而寡闻!

文章分类

全部博文(601)

文章存档

2020年(1)

2018年(4)

2017年(7)

2016年(42)

2015年(25)

2014年(15)

2013年(36)

2012年(46)

2011年(117)

2010年(148)

2009年(82)

2008年(37)

2007年(41)

分类: BSD

2008-03-12 13:10:17

情况描述:
  先同步scr和ports,然后直接make buildworld,make buildkernel,make installkernel,reboot,make installworld方式安装,由于服务器上只有一个ftp和nat,所以没有用mergemaster,想看一下效果。
  防火墙用ipfw,想用内核的natd,所以加上ipfw等选项。

1、内核配置文件中,sctp和ipfirewall_nat选项通不过,后来注释掉,先编一个内核测试。看了一下说明,sctp要同时启用ipv4和ipv6才能工作,因为我不需要ipv6,所以sctp也只好不用了。
2、内核配置文件中,没有TCP_DROP_SYNFIN选项,默认已经启用。但是要通过sysctl调整。

3、安装内核后,重启,正常。installworld后,重启,远程无连接。然后睡觉。
4、到办公室,接上显示器,发现主要有两个错误,一个是sshd错误,记录在/var/log/messages里面。
  sshd[968]: in openpam_dispatch(): pam_nologin.so: no pam_sm_authenticate()
  另一个是natd的错误,只在控制台里出现,没记录在messages里。
   (没注意记准确的消息,只是关于/etc/aliase.conf没有找到。)
5、对于第一个错误,处理是ee /etc/pam.d/sshd,把第一行的auth改为accout。
6、对于第二个错误,处理是:复制/usr/share/exampl...里的aliase.conf复制到/etc里面。

7、重新写内核配置文件,发现内核natd还是不行,出现错误:

   ip_fw2.o(.text+0x2a4): In function `del_redir_spool_cfg':
/usr/src/sys/netinet/ip_fw2.c:2154: undefined reference to `LibAliasRedirectDelete'
ip_fw2.o(.text+0x17c6): In function `ipfw_destroy':
/usr/src/sys/netinet/ip_fw2.c:5037: undefined reference to `LibAliasUninit'
ip_fw2.o(.text+0x3143): In function `ipfw_ctl':
/usr/src/sys/netinet/ip_fw2.c:4684: undefined reference to `LibAliasInit'
ip_fw2.o(.text+0x3279):/usr/src/sys/netinet/ip_fw2.c:4711: undefined reference to `LibAliasSetMode'
ip_fw2.o(.text+0x3291):/usr/src/sys/netinet/ip_fw2.c:4712: undefined reference to `LibAliasSetAddress'
ip_fw2.o(.text+0x33ae):/usr/src/sys/netinet/ip_fw2.c:2190: undefined reference to `LibAliasRedirectAddr'
ip_fw2.o(.text+0x3450):/usr/src/sys/netinet/ip_fw2.c:2199: undefined reference to `LibAliasRedirectPort'
ip_fw2.o(.text+0x34b2):/usr/src/sys/netinet/ip_fw2.c:2210: undefined reference to `LibAliasRedirectProto'
ip_fw2.o(.text+0x356e):/usr/src/sys/netinet/ip_fw2.c:2226: undefined reference to `LibAliasAddServer'
ip_fw2.o(.text+0x37d9):/usr/src/sys/netinet/ip_fw2.c:4746: undefined reference to `LibAliasUninit'
ip_fw2.o(.text+0x3d5d): In function `ifaddr_change':
/usr/src/sys/netinet/ip_fw2.c:2085: undefined reference to `LibAliasSetAddress'
ip_fw2.o(.text+0x7213): In function `ipfw_chk':
/usr/src/sys/netinet/ip_fw2.c:3502: undefined reference to `m_megapullup'
ip_fw2.o(.text+0x7280):/usr/src/sys/netinet/ip_fw2.c:3566: undefined reference to `LibAliasIn'
ip_fw2.o(.text+0x7299):/usr/src/sys/netinet/ip_fw2.c:3569: undefined reference to `LibAliasOut'

按照/usr/src/sys/conf/NOTES里的提示,加上编译参数,还是不行。

最后,仔细看NOTES,发现必须加上
  options        LIBALIAS
终于编译通过。

阅读(1937) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~