Re: natd port redirect

From: Rainer Homburg (rahom_at_gmx.net)
Date: 01/23/04


Date: Fri, 23 Jan 2004 23:33:58 +0100


You need also some rules for ipfw:

Divert incoming packets to natd:

ipfw add divert natd tcp from any to me <port> in via tun0

Divert responses to natd:

ipfw add divert natd tcp from <server> <port> to any out via
tun0 established

These diversions to natd are necessary, otherwise natd won't
receive any packets to change its source/destination address.

You maybe also need something like:

ipfw add allow tcp from any to any dst-port 80 in via tun0 setup

RH



Relevant Pages

  • IPFW2 script with natd and loadsharing
    ... in the same IPFW2 firewall script. ... ipfw -f -q flush ... # Package going in the download-direction are translated by NATD ... ipfw add 100 divert natd ip from any to 192.168.10.248 // Download ...
    (freebsd-questions)
  • IPFW - Two External Interfaces
    ... I am attempting to use IPFW (and either IPNAT or natd) to do the following: ... the DSL line on em0. ... 00400 divert 8869 ip from any to any in via bge1 ...
    (freebsd-questions)
  • Re: SMP and networking under FreeBSD 5.3
    ... Okay, I've been looking and looking for duplicate natd's. ... I have the /etc/rc.conf which has natd stuff below, ... other place I see it is in ipfw. ... > The divert rule in my firewall says: ...
    (freebsd-questions)
  • Re: NAT/Steam/Routing Problem - 25.00 Reward for a solution!
    ... First - do NAT via natd and not via ppp. ... ipfw add 110 deny ip from not $in_net in recv $in_if ... # now the first divert stuff - all traffic here is from somewhere to the server ...
    (comp.unix.bsd.freebsd.misc)
  • Re: ipfw divert with exception?
    ... but putting the exception rules before the ... Subject: ipfw divert with exception? ... > natd for address translation, and I have rule like so: ...
    (freebsd-questions)