From owner-freebsd-questions@FreeBSD.ORG Fri Mar 11 09:18:08 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E049C1065670 for ; Fri, 11 Mar 2011 09:18:08 +0000 (UTC) (envelope-from kayasaman@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 99AE68FC1B for ; Fri, 11 Mar 2011 09:18:08 +0000 (UTC) Received: by qwj8 with SMTP id 8so2133673qwj.13 for ; Fri, 11 Mar 2011 01:18:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=4MqRMBuC3CuxkfCcTxfE85gx+brP3TT1kyL8satme68=; b=x8ey+amF6DsPWbEvtiYeQx5tCWSWCpiq0Z45FF42MvBpOuPc+fMqQCEcGpD/D3u24t r8IIMjpy0jLOQ0ljoO+LZ9Y++4yRntoA0DzaTlovJ683i2eyf4eqbylrCKTno7mD1qgy No/G4FFS3vAudYOhXRoE7Tx5S77000Gj3/D1Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Yon2AdwHgQS9BZeNFjB95Tqa11+ut0+8EEeFMvMe7UX351M7imwkZbKEpNq7Ls9PeO +9nU5Qmjl5BZmkbkgjpAkH2Ni24YIbNJwql3i6BEix5QOOL/64tjgLyvyuIQDnvM8o0F KY9NObc+fmqZQNZh1hHM+aZbSms+1cD08EgiU= MIME-Version: 1.0 Received: by 10.224.211.71 with SMTP id gn7mr8050894qab.11.1299833583102; Fri, 11 Mar 2011 00:53:03 -0800 (PST) Received: by 10.224.54.131 with HTTP; Fri, 11 Mar 2011 00:53:03 -0800 (PST) Date: Fri, 11 Mar 2011 10:53:03 +0200 Message-ID: From: Kaya Saman To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Setting up a a route in FreeBSD with NAT issues X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2011 09:18:09 -0000 Hi all, I'm trying to setup a gateway between an internal network using Vbox test machines of which one is a FreeBSD router/gateway. Being familiar with Cisco I know how easy this is to do but I think that I'm struggling a bit with the syntax. My setup is as so: Damn Small Linux (virtual machine) -> (em1) FreeBSD 8.2 (virtual gateway) (em0) -> internal network 10.100.100.2 10.100.100.1 172.16.7.136 172.16.0.0/20 My current configuration within the FreeBSD router looks like so: /etc/rc.conf: gateway_enable="YES" hostname="ROUTER.test.org" ifconfig_em0="inet 172.16.7.136 netmask 255.255.240.0" #em0_nat="NO" ifconfig_em1="inet 10.100.100.1 netmask 255.255.255.192" #em1_nat="YES" inetd_enable="YES" keymap="uk.iso" sshd_enable="YES" defaultrouter="172.16.0.1" ipnat_enable="YES" ipnat_rules="/etc/ipnat.rules" named_enable="YES" static_routes="net1" route_net1="-net 10.100.100.0/26 0.0.0.0/0" /etc/ipnat.rules: map tun0 10.100.100.0/26 -> 0/0 portmap tcp/udp 10000:65000 map tun0 10.100.100.0/26 -> 0/0 The router from DSL is set as 10.100.100.1 and it hits it without any problem... running a traceroute however gives this: ROUTER# ipnat -l List of active MAP/Redirect filters: map tun0 10.100.100.0/26 -> 0.0.0.0/0 portmap tcp/udp 10000:65000 map tun0 10.100.100.0/26 -> 0.0.0.0/0 List of active sessions: Something here isn't working and I'm not sure quite what it is :-( Can anyone help??? Thanks Kaya