miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

No static IP/Gateway support

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> libnatpmp Bugs
View previous topic :: View next topic  
Author Message
lowerpower



Joined: 01 Oct 2007
Posts: 8

PostPosted: Thu Mar 05, 2009 6:14 am    Post subject: No static IP/Gateway support Reply with quote

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
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Fri Mar 06, 2009 6:48 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
lowerpower



Joined: 01 Oct 2007
Posts: 8

PostPosted: Sat Mar 07, 2009 5:30 am    Post subject: Reply with quote

Sorry, Windows. The registry code only works if the interface is setup with DHCP.

-lp
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Sat Mar 07, 2009 11:38 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Tue Mar 10, 2009 10:22 am    Post subject: Reply with quote

try with this version :
libnatpmp-20090310.tar.gz
I tried to handle both cases.
I've not tested, I need to get access to a windows machine Smile
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
lowerpower



Joined: 01 Oct 2007
Posts: 8

PostPosted: Tue Mar 10, 2009 5:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
nuclight



Joined: 17 Jan 2008
Posts: 23

PostPosted: Wed Mar 11, 2009 8:45 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Thu Mar 12, 2009 12:07 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
nuclight



Joined: 17 Jan 2008
Posts: 23

PostPosted: Mon Apr 20, 2009 7:26 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Mon Apr 20, 2009 9:00 am    Post subject: Reply with quote

maybe I should add an option to force gateway to use.
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Mon Jan 03, 2011 5:34 pm    Post subject: Reply with quote

option added to force gateway. See in :
libnatpmp-20110103.tar.gz
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> libnatpmp Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.