Re: NAT / ipfw / GW - FreeBSD 4.10 to Linux Private Network???

From: Rob Hughes (rob_at_robhughes.com)
Date: 08/15/04


Date: Sun, 15 Aug 2004 05:55:23 -0500

Hakim Z. Singhji is alleged to have said in comp.security.firewalls:
>
> I'm trying to get internet connection for my linux box, and I also want
> all pop3, smtp and http passed to my linux box as well. The freebsd box
> is setup to be headless once I get this configured properly. In addition
> I would like SSH2 to be able to tunnel from box to box as well as SSH2
> outside my network with my Linux box.

$cat natd.conf
use_sockets yes
same_ports yes
unregistered_only yes
dynamic yes
redirect_port tcp 192.168.1.3:25 25
redirect_port tcp 192.168.1.3:80 80
redirect_port tcp 192.168.1.3:110 110

That'll redirect those connections. Since you're using DHCP, this will be
problematic, as the IP could change with a reboot of the gatway. Either set
up a static assignment for it, or just hard code the IP. The latter is
prefereable in case of problems with the DHCP server failing.

You'll also need to allow that traffic in. However, there have been numerous
reports that getting "in" and "out" to work in a nat'ed environment are
problematic, at best. I suggest you review the archives of the IPFW list
for more information.
 
The syntax itself is fairly well documented in the natd man page.

-- 
Recursion: n. See Recursion.


Relevant Pages

  • Re: Linux 2.6.0 no TCP-Connections to Internet
    ... > I'm trying to move to linux 2.6. ... > problem with my Internet connection. ... worked fine, but outgoing TCP didn't, even though incoming TCP DID! ...
    (comp.os.linux.networking)
  • Dog slow TCP on 100 megabit/s LAN
    ... I'm having some TCP connectivity problems involving a WinXP box, ... and a router to share internet access and have a LAN for those two machines. ... DHCP server disabled (I use fixed IP on WinXP & Linux) ...
    (comp.os.linux.networking)
  • Dog slow TCP on 100 megabit/s LAN
    ... I'm having some TCP connectivity problems involving a WinXP box, ... and a router to share internet access and have a LAN for those two machines. ... DHCP server disabled (I use fixed IP on WinXP & Linux) ...
    (comp.os.linux.setup)
  • Re: TOE brain dump
    ... > When they've sorted out these problems, regular TCP has caught ... The Linux net stack just isn't built to be offloaded. ... TOE engines will ... NIC across the PCI bus using jumbo-ethernet-like data frames. ...
    (Linux-Kernel)
  • Re: TOE brain dump
    ... >> When they've sorted out these problems, regular TCP has caught ... > The Linux net stack just isn't built to be offloaded. ... TOE engines will ...
    (Linux-Kernel)