[clue-tech] A port triggering application.

David L. Anselmi anselmi at anselmi.us
Wed Oct 21 12:45:44 MDT 2009


So I have a Linksys router doing NAT.  On the inside is an apt 
repository (HTTP).  On the outside is the apt client.

So you can (and I did) set up port forwarding so the outside clients 
could get to the inside repository.  But that requires knowing the 
inside IP address, which changes due to DHCP.  (The Linksys DHCP server 
isn't smart enough to reserve addresses.  And I'm too lazy to figure out 
per-network settings so the repository can use a static IP--it changes 
networks sometimes.)

When I went to change the port forwarding I noticed the port triggering 
page.  When the router sees a connection going out to a port it opens a 
port for incoming connections (sort of a temporary port forward).  The 
nice thing is that it handles the address for you so it won't break when 
the DHCP lease changes.

What port should I use to trigger opening port 80?  Well, it's easy to 
send random packets to random ports (nc(1)), so maybe something like 
discard (I don't think the port has to be open on the outside machine). 
  I wonder how long the triggered port stays open?  Times out after 
outgoing traffic, or incoming?

Oh, wait.  I always use apt over SSH so I'll just trigger on that. 
Works like a charm.

(What I really need is time to put real firmware on the Linksys and then 
I wouldn't need silly workarounds.  And some more machines so economies 
of scale would make it worth setting up LDAP and a more automated 
configuration process.)

Thanks for listening.  It's nice to fool with networking while the snow 
falls.  I'll go back to work tomorrow and stop bothering you.

Dave


More information about the clue-tech mailing list