From owner-freebsd-questions@FreeBSD.ORG Tue May 6 10:26:02 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9DC3037B401 for ; Tue, 6 May 2003 10:26:02 -0700 (PDT) Received: from ns2.weronet.com (chello213047208163.surfer.at [213.47.208.163]) by mx1.FreeBSD.org (Postfix) with SMTP id 18BDB43FA3 for ; Tue, 6 May 2003 10:26:01 -0700 (PDT) (envelope-from freebsd@werosoft.com) Received: (qmail 50353 invoked from network); 6 May 2003 18:07:16 -0000 Received: from unknown (HELO sonne) (213.47.208.170) by ns2.weronet.com with SMTP; 6 May 2003 18:07:16 -0000 From: "Ronald Weinrich" To: freebsd-questions@freebsd.org Date: Tue, 06 May 2003 19:28:02 +0200 MIME-Version: 1.0 Message-ID: <3EB80CC2.22463.58BE09B@localhost> Priority: normal X-mailer: Pegasus Mail for Windows (v4.02, DE v4.02 R1) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Subject: ipnat - No route to host X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd@werosoft.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2003 17:26:02 -0000 Hi list, I try to setup ipnat for my freebsd-box v.4.8 but something goes wrong and I can not find out what. I thought first install ipnat and than ipfilter? if I ping from freebsd-box 192.168.0.1 or xx.xx.xx.166 I get No route to host I hope any of you can give me a hint thanks in advance Ron my system looks like: INTERNET --------- ip xx.xx.xx.xx | | --------- ip xx.xx.xx.xx MY ROUTER --------- 213.47.28.161 is gw for ..162 and 163 | | --------www dns1 xx.xx.xx.162 | --------dns2 xx.xx.xx.163 | | --------- ed0 xx.xx.xx.166 freebsd-box ipnat should run here :) (ipfilter) later may be ;) --------- ep0 192.168.0.1 gw for intra 192.168.0.xx | | --------- winxx ip 192.168.0.xx gw 192.168.0.1 subn 255.255.255.0 I build the kernel with options IPFILTER options IPFILTER_LOG options IPFILTER_DEFAULT_BLOCK in rc.conf is hostname="firewall" defaultrouter="213.47.28.161" ?????? gateway_enable="YES" ipnat_enable="YES" ifconfig_ed0="inet 213.47.28.166 netmask 255.255.255.240" kern_securelevel_enable="NO" linux_enable="NO" nfs_reserved_port_only="YES" sendmail_enable="YES" sshd_enable="YES" in /usr/local/etc/rc.d/ipnat.sh -------------------------------- #!/bin/sh /sbin/ifconfig ep0 down /sbin/ifconfig ep0 inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.5.255 /sbin/ifconfig ep0 up [ -x /sbin/ipnat ] && /sbin/ipnat -CF -f /etc/ipnat.conf && ipf - y && echo -n 'ipnat' in etc/ipnat.conf ------------------- map ep0 192.168.0.0/24 -> 213.47.28.160/32 portmap tcp/udp 10000:60000 ep0 192.168.0.0/24 -> 213.47.28.160/32 ipnat.rules is empty ?