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 

Multiple interface forwarding

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Feature Request
View previous topic :: View next topic  
Author Message
WhiteD



Joined: 26 Jun 2008
Posts: 3

PostPosted: Fri Jun 27, 2008 10:44 am    Post subject: Multiple interface forwarding Reply with quote

Hi
Can you add possibility to add more than one WAN interface in config? I have FreeBSD (pf) gateway with two physical interfaces (not an alias) and i wish that rdr rules to be created both for first and second WAN.

Sorry for my bad english.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1592

PostPosted: Sat Jun 28, 2008 11:29 am    Post subject: Re: Multiple interface forwarding Reply with quote

WhiteD wrote:
Hi
Can you add possibility to add more than one WAN interface in config? I have FreeBSD (pf) gateway with two physical interfaces (not an alias) and i wish that rdr rules to be created both for first and second WAN.

How to know on which of the 2 interfaces rdr rules should be created ?
Also which IP should return the UPNP function "GetEXternalIPAddress" if there is 2 of them Smile
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
tbnh



Joined: 31 Jul 2008
Posts: 1

PostPosted: Thu Jul 31, 2008 9:56 am    Post subject: as variant... Reply with quote

1. Is it possible to run two or more instances of miniupnpd (with different uuids) ? And clients will choose which IGD to use...

2. Or maybe possible to make rules more flexible, so that administrator can add some logic to them... ((a) configurable conditions + (b) ability to add more rules per mapping (with iface1, iface2, ...))

PS. I`m sorry about my english. (
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1592

PostPosted: Thu Jul 31, 2008 10:07 am    Post subject: Re: as variant... Reply with quote

tbnh wrote:
1. Is it possible to run two or more instances of miniupnpd (with different uuids) ? And clients will choose which IGD to use...

That could be possible. But I never tested...

tbnh wrote:
2. Or maybe possible to make rules more flexible, so that administrator can add some logic to them... ((a) configurable conditions + (b) ability to add more rules per mapping (with iface1, iface2, ...))

that will currently require some big change in the code
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
andr1y



Joined: 22 Apr 2013
Posts: 2

PostPosted: Mon Apr 22, 2013 5:54 pm    Post subject: Re: as variant... Reply with quote

Hello, I have also two external interfaces. I need to created for them same rule of PF
Back to top
View user's profile Send private message
andr1y



Joined: 22 Apr 2013
Posts: 2

PostPosted: Mon Apr 22, 2013 6:03 pm    Post subject: Re: as variant... Reply with quote

if so run - /usr/local/sbin/miniupnpd -f /usr/local/etc/miniupnpd.conf -i vlan783 -i vlan345 then creates a rule for only one interface

created rule -

rdr pass quick on vlan345 inet proto tcp from any to any port = 29757 keep state label "NAT-PMP 29757 tcp" rtable 0 -> 10.1.70.111 port 29757



need to created two rules -

rdr pass quick on vlan783 inet proto tcp from any to any port = 29757 keep state label "NAT-PMP 29757 tcp" rtable 0 -> 10.1.70.111 port 29757
rdr pass quick on vlan345 inet proto tcp from any to any port = 29757 keep state label "NAT-PMP 29757 tcp" rtable 0 -> 10.1.70.111 port 29757
Back to top
View user's profile Send private message
c0d3ki113r
Guest





PostPosted: Tue Sep 27, 2022 4:06 am    Post subject: Reply with quote

Hi there,

I have the exact same problem.

I have 2 WAN interfaces eth1 and wg0 both having 2 different public IPs.
I have 2 isolated LANs 192.168.10.0/24 and 192.168.11.0/24 respectively going out using WAN eth1 and WAN wg0.

Is anything in the configuration I could use to specify a second ext_if to use for a second LAN network?

Basically it seems I need the equivalent of 2 instances of miniupnpd running for opening ports from hosts of a given LAN on the corresponding WAN interface. In that case GetEXternalIPAddress would return the proper interface for each network.

The configuration explains well how to use a specific WAN IP if there are multiple IPs on the WAN interface, but I don't see anything in case there are multiple WAN interfaces.

Thanks for the help.
Back to top
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1592

PostPosted: Sat Oct 01, 2022 11:32 am    Post subject: Reply with quote

c0d3ki113r wrote:
Hi there,

I have the exact same problem.

I have 2 WAN interfaces eth1 and wg0 both having 2 different public IPs.
I have 2 isolated LANs 192.168.10.0/24 and 192.168.11.0/24 respectively going out using WAN eth1 and WAN wg0.

Is anything in the configuration I could use to specify a second ext_if to use for a second LAN network?

Basically it seems I need the equivalent of 2 instances of miniupnpd running for opening ports from hosts of a given LAN on the corresponding WAN interface. In that case GetEXternalIPAddress would return the proper interface for each network.

The configuration explains well how to use a specific WAN IP if there are multiple IPs on the WAN interface, but I don't see anything in case there are multiple WAN interfaces.

Thanks for the help.


you should build with the MULTIPLE_EXTERNAL_IP option enabled.
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
c0d3ki113r
Guest





PostPosted: Mon Oct 03, 2022 4:52 am    Post subject: Reply with quote

Thanks for the answer.

I've seen that once built with MULTIPLE_EXTERNAL_IP, we can specify the outgoing WAN IP to use for a specific LAN which is exactly what I need.

So my config would be (with for example 1.2.3.4 and 4.3.2.1 being my 2 WAN IPs):
listening_ip=192.168.10.1/24 1.2.3.4
listening_ip=192.168.11.1/24 4.3.2.1

The bit I'm not sure about is what to set in that case for the ext_ifname config parameter as it seem to only take one physical interface.
Today i've set it with ext_ifname=eth1 but I'm not sure how to add wg0 interface as well.

Thoughts?

Merci ! Smile
Back to top
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Feature Request 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.