views:

164

answers:

4

Is there a reliable programmatic method to open ports common firewall appliances?

A: 

If the firewall is a secure one, then no. It would defeat the purpose if code could just open holes, no?

BarrettJ
I assumed it would require some authority from user (i.e., provide auth for firewall)
philbo
+4  A: 

The UPnP protocols may help with consumer-grade devices like cable routers. However, I'm not sure I'd call them "reliable", since not all hardware supports them. This is, however, how the Xbox 360 tries to punch through NAT devices for Xbox Live.

MattK
I would say this is the best bet. Since philbo said "appliances", i'm assuming he means routers. UPnP would be the option to request a port opened for a user/application. If not supported, the user would be required to do port forwarding to the IP address manually.
Will Eddins
A: 

Adding to Mattk's answer you could also use NAT-PNP along with UPnP. It's an emerging standard promoted by Apple and used in its recent Airport Extreme WiFi access points. Here's a quick document covering most of the protocol: http://miniupnp.free.fr/nat-pmp.html

frgtn
A: 

Short answer: no.

There are some methods for simple IPv4/NAT gateways, i.e. NAT-PMP and UPnP IGD, but they're not guaranteed to be there, and when you do have them, it's usually only one or the other and not both. More often than not, you get nothing. For simple IPv6 firewalls, it's worse: there's just nothing. Full stop.

Sadly, things like portforward.com exist because they continue to serve a useful purpose.

james woodyatt