Opened 8 years ago

Closed 8 years ago

#591 closed defect (fixed)

Host/interface "IP Configuration" for udp/ntcp ignored

Reported by: Z6 Owned by: zzz
Priority: major Milestone: 0.8.13
Component: router/transport Version: 0.8.12
Keywords: bind ip interface Cc:
Parent Tickets: Sensitive: no

Description

This bug were checked on two routers.
Usually my system with i2p router have few network interfaces.
For this reason need to bind I2P to specific IP/interface.

I choose specific IP on "IP and Transport Configuration" page for UDP and NTCP.
After i got in advanced settings something like that:

i2np.ntcp.autoip=false
i2np.ntcp.enable=true
i2np.ntcp.hostname=AAA.BB.CCC.DDD
i2np.udp.addressSources=fixed
i2np.udp.host=AAA.BB.CCC.DDD

So UDP and NTCP ports both should listen on same (just one) IP adress.
But after restart nothing changed, I2P listen ports (udp/ntcp) on all interfaces.

Subtickets

Change History (3)

comment:1 Changed 8 years ago by zzz

Component: router/generalrouter/transport

You are correct, those settings control what IP address is advertised (see /netdb?r=. ) which is different than what is bound.

There's nothing in the UI to set the bound address, but try the advanced configs:

i2np.ntcp.bindInterface=AAA.BB.CCC.DDD
i2np.udp.bindInterface=AAA.BB.CCC.DDD

Maybe we should try to bind to the configured public address, but only if it is available. So if your public IP is set to 1.2.3.4 and you have a local 1.2.3.4 interface, bind only to it, otherwise bind to all as usual. So everything would still work if you configure your IP address but you are behind a firewall on a 192.x subnet.

Give the advanced config a try and let me know what you think about the above proposal.

comment:2 Changed 8 years ago by Z6

Thank. ".bindInterface" work fine for me.
But I cant give any useful advice for this problem.

Just one idea: give user to choose from "system" hardware interfaces: eth0 eth1 eth1:1 lo tun0 tun1
I don't sure about realization in Windows system.

comment:3 Changed 8 years ago by zzz

Resolution: fixed
Status: newclosed

Thanks for testing and reporting.

I'm implementing my proposed change in 0.8.12-7:

If i2np.xxx.bindInterface is not set, and the hostname/host for the transport is set, and the IP is an available local interface, then bind only to that interface. In other words, act as if the bindInterface was set to the same as the hostname. This will eliminate the need for users to set the advanced configs i2np.xxx.bindInterface manually.

This was easier to do than using hardware interface names like eth0.

Note: See TracTickets for help on using tickets.