View previous topic :: View next topic |
Author |
Message |
lowerpower
Joined: 01 Oct 2007 Posts: 8
|
Posted: Thu Mar 05, 2009 6:14 am Post subject: No static IP/Gateway support |
|
|
Hi, I was playing with NAT-PMP and noticed that the default gateway code only supported DHCP configured interfaces.
It shouldn't be hard to add the ability to do static configured interfaces, If I have time I will forward the code. This is just a heads up.
Now I have to get back to Apple to find out what they don't map outbound UDP packets with a mapped port. LOL.
-lp |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Fri Mar 06, 2009 6:48 pm Post subject: |
|
|
about which Operating system are you talking about ?
there are several implementations of getdefault gateway. _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
lowerpower
Joined: 01 Oct 2007 Posts: 8
|
Posted: Sat Mar 07, 2009 5:30 am Post subject: |
|
|
Sorry, Windows. The registry code only works if the interface is setup with DHCP.
-lp |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Sat Mar 07, 2009 11:38 am Post subject: |
|
|
lowerpower wrote: | Sorry, Windows. The registry code only works if the interface is setup with DHCP.
-lp |
Ok:) Well if you have some code that's working for hand configured gateway, I'll be glad to include it in libnatpmp. _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
|
Back to top |
|
|
lowerpower
Joined: 01 Oct 2007 Posts: 8
|
Posted: Tue Mar 10, 2009 5:45 pm Post subject: |
|
|
Try it with this instead
Code: |
if((gatewayValueType == REG_MULTI_SZ || gatewayValueType == REG_SZ) && (gatewayValueLength>1))
|
I think you need to check the length because the "DefaultGatway" key is always there on every interface, but it is blank if not used.
The upside is, if the "DefaultGateway" is defined, it is the same on all Interfaces as far as I can tell.
Thanks,
-lp |
|
Back to top |
|
|
nuclight
Joined: 17 Jan 2008 Posts: 23
|
Posted: Wed Mar 11, 2009 8:45 am Post subject: |
|
|
By the way, it was noted that on Linux and Windows most programs fail to get proper default gateway because real Internet comes via PPP (PPPoE or PPTP), and default gateway entry looks to interface, not host, or even this machine's IP (on the PPP interface). So simple routing table entry doesn't work, it should be discovered by OS-specific means. UPnP uses multicasting and is still likely to work, though. While NAT-PMP breaks.
I was told that only Azureus has workaround for it (it allows to manually statically specify gw). Any ways to fix software?.. Or ask Apple to modify NAT-PMP specs to allow multicast?.. _________________ WBR, Nuclear Lightning |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Thu Mar 12, 2009 12:07 am Post subject: |
|
|
but if Internet comes by PPPoE or PPTP, there is no need for NAT and NAT Traversal ! _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
nuclight
Joined: 17 Jan 2008 Posts: 23
|
Posted: Mon Apr 20, 2009 7:26 am Post subject: |
|
|
There are providers that give clients gray addresses and then NATting them. May be they do this for even more IPv4 address space shortage, may be this is default price (white IP should be bought separately), I don't know, but they already exist. Sad, but true. _________________ WBR, Nuclear Lightning |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Mon Apr 20, 2009 9:00 am Post subject: |
|
|
maybe I should add an option to force gateway to use. _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
|
Back to top |
|
|
|