In some email I received from Adam Summerfield, sie wrote:
>
> Having left 4.1 in place for a few days, this is my findings.....
>
> 1. a solaris server behind the firewall had lost time sync (udp nat).
> 2. windows pc behind the firewall could not connect reliably to PPTP server. (go
> back to 3.4.33 and it connects first time every
> time)(incoming gre not getting "natted").
> 3. a solaris server behind the firewall could not traceroute outside of the network
> (icmp nat).
Can you please use tcpdump/snoop to get capture files (tcpdump -w,
snoop -o) with the packet data from the NIC you are doing NAT on
and send them on to me, please ?
> 4. ipfstat will not run as setuid.
Try patch below.
Darren
Index: lib/checkrev.c
===================================================================
RCS file: /devel/CVS/IP-Filter/lib/checkrev.c,v
retrieving revision 1.12
retrieving revision 1.12.2.1
diff -c -r1.12 -r1.12.2.1
*** checkrev.c 2003/12/01 01:59:42 1.12
--- checkrev.c 2004/03/09 14:44:39 1.12.2.1
***************
*** 3,9 ****
*
* See the IPFILTER.LICENCE file for details on licencing.
*
! * $Id: checkrev.c,v 1.12 2003/12/01 01:59:42 darrenr Exp $
*/
#include <sys/ioctl.h>
--- 3,9 ----
*
* See the IPFILTER.LICENCE file for details on licencing.
*
! * $Id: checkrev.c,v 1.12.2.1 2004/03/09 14:44:39 darrenr Exp $
*/
#include <sys/ioctl.h>
***************
*** 15,23 ****
int checkrev(ipfname)
char *ipfname;
{
struct friostat fio, *fiop = &fio;
ipfobj_t ipfo;
- int vfd;
bzero((caddr_t)&ipfo, sizeof(ipfo));
ipfo.ipfo_rev = IPFILTER_VERSION;
--- 15,23 ----
int checkrev(ipfname)
char *ipfname;
{
+ static int vfd = -1;
struct friostat fio, *fiop = &fio;
ipfobj_t ipfo;
bzero((caddr_t)&ipfo, sizeof(ipfo));
ipfo.ipfo_rev = IPFILTER_VERSION;
***************
*** 25,31 ****
ipfo.ipfo_ptr = (void *)fiop;
ipfo.ipfo_type = IPFOBJ_IPFSTAT;
! if ((vfd = open(ipfname, O_RDONLY)) == -1) {
perror("open device");
return -1;
}
--- 25,31 ----
ipfo.ipfo_ptr = (void *)fiop;
ipfo.ipfo_type = IPFOBJ_IPFSTAT;
! if ((vfd == -1) && ((vfd = open(ipfname, O_RDONLY)) == -1)) {
perror("open device");
return -1;
}
***************
*** 33,41 ****
if (ioctl(vfd, SIOCGETFS, &ipfo)) {
perror("ioctl(SIOCGETFS)");
close(vfd);
return -1;
}
- close(vfd);
if (strncmp(IPL_VERSION, fio.f_version, sizeof(fio.f_version))) {
return -1;
--- 33,41 ----
if (ioctl(vfd, SIOCGETFS, &ipfo)) {
perror("ioctl(SIOCGETFS)");
close(vfd);
+ vfd = -1;
return -1;
}
if (strncmp(IPL_VERSION, fio.f_version, sizeof(fio.f_version))) {
return -1;
Index: tools/ipfstat.c
===================================================================
RCS file: /devel/CVS/IP-Filter/tools/ipfstat.c,v
retrieving revision 1.44.2.2
retrieving revision 1.44.2.3
diff -c -r1.44.2.2 -r1.44.2.3
*** ipfstat.c 2004/03/07 05:10:22 1.44.2.2
--- ipfstat.c 2004/03/09 14:49:58 1.44.2.3
***************
*** 67,73 ****
#if !defined(lint)
static const char sccsid[] = "@(#)fils.c 1.21 4/20/96 (C) 1993-2000 Darren
Reed";
! static const char rcsid[] = "@(#)$Id: ipfstat.c,v 1.44.2.2 2004/03/07 05:10:22
darrenr Exp $";
#endif
#ifdef __hpux
--- 67,73 ----
#if !defined(lint)
static const char sccsid[] = "@(#)fils.c 1.21 4/20/96 (C) 1993-2000 Darren
Reed";
! static const char rcsid[] = "@(#)$Id: ipfstat.c,v 1.44.2.3 2004/03/09 14:49:58
darrenr Exp $";
#endif
#ifdef __hpux
***************
*** 209,219 ****
if (live_kernel == 1) {
if ((state_fd = open(IPSTATE_NAME, O_RDONLY)) == -1) {
! perror("open");
exit(-1);
}
if ((ipf_fd = open(device, O_RDONLY)) == -1) {
! perror("open");
exit(-1);
}
}
--- 209,220 ----
if (live_kernel == 1) {
if ((state_fd = open(IPSTATE_NAME, O_RDONLY)) == -1) {
! perror("open(IPSTATE_NAME)");
exit(-1);
}
if ((ipf_fd = open(device, O_RDONLY)) == -1) {
! fprintf(stderr, "open(%s)", device);
! perror("");
exit(-1);
}
}
***************
*** 224,229 ****
--- 225,232 ----
(void)setuid(getuid());
}
+ if (live_kernel == 1)
+ (void) checkrev(device);
if (openkmem(kern, memf) == -1)
exit(-1);