Subject: HELP w/nat for webcam
To: None <netbsd-help@NetBSD.org>
From: Paul Newhouse <newhouse@rockhead.com>
List: netbsd-help
Date: 03/11/2007 16:19:36
Running NetBSD 3.0.1.

I have tne following NAT rules:

  rdr tlp1 0.0.0.0/32 port 9779 -> 192.168.0.20 port 80 tcp  
  rdr tlp1 0.0.0.0/32 port 9779 -> 192.168.0.20 port 80 ucp  

which didn't seem to work, so I added these:

  rdr re0 192.168.0.20/32 port 80 -> 0.0.0.0 port 9779 tcp 
  rdr re0 192.168.0.20/32 port 80 -> 0.0.0.0 port 9779 udp 

I have this internal interface:

  # ifconfig re0
  re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
          capabilities=87<IP4CSUM,TCP4CSUM,UDP4CSUM,TSO4>
          enabled=0
          address: 00:12:17:57:8e:a6
          media: Ethernet autoselect (100baseTX full-duplex)
          status: active
          inet 172.16.89.45 netmask 0xffffff00 broadcast 172.16.89.255
          inet alias 192.168.0.2 netmask 0xffff0000 broadcast 192.168.255.255
          inet6 fe80::212:17ff:fe57:8ea6%re0 prefixlen 64 scopeid 0x2

On the LAN I can get the picture from the webacam.  However, from externally,
the connection does not get made.  Incoming traffic can be seen on tlp1


  15:53:34.911217 IP shell4.bayarea.net.43227 > c-24-5-203-5.hsd1.ca.comcast.net.9779: S 400153723:400153723(0) win 5840 <mss 1460,sackOK,timestamp 1502467760 0,nop,wscale 2>
  15:53:34.918943 IP c-24-5-203-5.hsd1.ca.comcast.net.9779 > shell4.bayarea.net.43227: R 0:0(0) ack 1 win 0
  15:53:46.910100 IP shell4.bayarea.net.43227 > c-24-5-203-5.hsd1.ca.comcast.net.9779: S 400153723:400153723(0) win 5840 <mss 1460,sackOK,timestamp 1502479760 0,nop,wscale 2>
  15:53:46.917720 IP c-24-5-203-5.hsd1.ca.comcast.net.9779 > shell4.bayarea.net.43227: R 0:0(0) ack 1 win 0

but, nothing shows up on another interface. 

Where did I go wrong?

TIA,
Paul