PurpleI2P / i2pd

🛡 I2P: End-to-End encrypted and anonymous Internet
https://i2pd.website
BSD 3-Clause "New" or "Revised" License
3.26k stars 423 forks source link

External address stuck at localhost IP #1501

Closed zoonderkins closed 4 years ago

zoonderkins commented 4 years ago

Debian 10 64bit Ipv4, Ipv6 ready Fresh install on Digitalocean VPS

I got this wired situation, how to fix?

image

Thanks

r4sas commented 4 years ago

Your firewall may be too restricted. Can you check logs for

?

zoonderkins commented 4 years ago

What kind of port range or protocol that I need to open?

r4sas commented 4 years ago

Can you say which version you have installed?

zoonderkins commented 4 years ago

Latest version.

r4sas commented 4 years ago

Which one? You installed i2pd from debian repository, or from comminity repo where packages updated every release? Please provide version number. Current latest version doesn't have NTCP enabled by default.

Application must have ability to send outgoing requests to any hosts, incoming connections to ports which printed in external addresses section (for you installation: TCP/23698, UDP/23698, TCP/16542).

zoonderkins commented 4 years ago

I follow this tutorial: https://i2pd.readthedocs.io/en/latest/user-guide/install/

wget -q -O - https://repo.i2pd.xyz/.help/add_repo | sudo bash -s -
apt-get update
apt-get install i2pd

in my i2pd.conf I grab from my other Debian server which work perfectly.

## Log messages above this level (debug, *info, warn, error, none)
## If you set it to none, logging will be disabled
loglevel = none
## Write full CLF-formatted date and time to log (default: write only time)
# logclftime = true

## Daemon mode. Router will go to background after start
daemon = true

## Specify a family, router belongs to (default - none)
# family =

## External IP address to listen for connections
## By default i2pd sets IP automatically
# host = 1.2.3.4

## Port to listen for connections
## By default i2pd picks random port. You MUST pick a random number too,
## don't just uncomment this
# port = 4567

## Enable communication through ipv4
ipv4 = true
## Enable communication through ipv6
ipv6 = true

## Network interface to bind to
# ifname =
## You can specify different interfaces for IPv4 and IPv6
# ifname4 =
# ifname6 =

## Enable NTCP transport (default = true)
ntcp = true
## If you run i2pd behind a proxy server, you can only use NTCP transport with ntcpproxy option
## Should be http://address:port or socks://address:port
# ntcpproxy = http://0.0.0.0:8118
## Enable SSU transport (default = true)
ssu = true

## Should we assume we are behind NAT? (false only in MeshNet)
#nat = true

## Bandwidth configuration
## L limit bandwidth to 32KBs/sec, O - to 256KBs/sec, P - to 2048KBs/sec,
## X - unlimited
## Default is X for floodfill, L for regular node
bandwidth = O
## Max % of bandwidth limit for transit. 0-100. 100 by default
share = 100

## Router will not accept transit tunnels, disabling transit traffic completely
## (default = false)
# notransit = true

## Router will be floodfill
floodfill = true

[http]
## Web Console settings
## Uncomment and set to 'false' to disable Web Console
enabled = true
## Address and port service will listen on
address = 0.0.0.0
port = 7657
## Path to web console, default "/"
# webroot = /
## Uncomment following lines to enable Web Console authentication
# auth = true
# user = i2pd
# pass = changeme

[httpproxy]
## Uncomment and set to 'false' to disable HTTP Proxy
enabled = true
## Address and port service will listen on
address = 0.0.0.0
port = 4444
## Optional keys file for proxy local destination
# keys = http-proxy-keys.dat
## Enable address helper for adding .i2p domains with "jump URLs" (default: true)
addresshelper = true
## Address of a proxy server inside I2P, which is used to visit regular Internet
outproxy = http://false.i2p
## httpproxy section also accepts I2CP parameters, like "inbound.length" etc.

[socksproxy]
## Uncomment and set to 'false' to disable SOCKS Proxy
enabled = true
## Address and port service will listen on
address = 0.0.0.0
port = 4447
## Optional keys file for proxy local destination
# keys = socks-proxy-keys.dat
## Socks outproxy. Example below is set to use Tor for all connections except i2p
## Uncomment and set to 'true' to enable using of SOCKS outproxy
outproxy.enabled = true
## Address and port of outproxy
outproxy = 0.0.0.0
outproxyport = 9050
## socksproxy section also accepts I2CP parameters, like "inbound.length" etc.

[sam]
## Uncomment and set to 'true' to enable SAM Bridge
enabled = true
## Address and port service will listen on
address = 0.0.0.0
port = 7656

[bob]
## Uncomment and set to 'true' to enable BOB command channel
enabled = true
## Address and port service will listen on
address = 0.0.0.0
port = 2827

[i2cp]
## Uncomment and set to 'true' to enable I2CP protocol
enabled = true
## Address and port service will listen on
address = 0.0.0.0
port = 7654

[i2pcontrol]
## Uncomment and set to 'true' to enable I2PControl protocol
# enabled = false
## Address and port service will listen on
# address = 0.0.0.0
# port = 7650
## Authentication password. "itoopie" by default
# password = itoopie

[precomputation]
## Enable or disable elgamal precomputation table
## By default, enabled on i386 hosts
# elgamal = true

[upnp]
## Enable or disable UPnP: automatic port forwarding (enabled by default in WINDOWS, ANDROID)
enabled = true
## Name i2pd appears in UPnP forwardings list (default = I2Pd)
name = I2Pd

[reseed]
## Options for bootstrapping into I2P network, aka reseeding
## Enable or disable reseed data verification.
verify = true
## URLs to request reseed data from, separated by comma
## Default: "mainline" I2P Network reseeds
#urls = https://reseed.i2p-projekt.de/,https://i2p.mooo.com/netDb/,https://netdb.i2p2.no/
## Path to local reseed data file (.su3) for manual reseeding
#file = /path/to/i2pseeds.su3
## or HTTPS URL to reseed from
#file = https://legit-website.com/i2pseeds.su3
## Path to local ZIP file or HTTPS URL to reseed from
zipfile = /path/to/netDb.zip
## If you run i2pd behind a proxy server, set proxy server for reseeding here
## Should be http://address:port or socks://address:port
# proxy = http://0.0.0.0:8118
## Minimum number of known routers, below which i2pd triggers reseeding. 25 by default
# threshold = 25

[addressbook]
## AddressBook subscription URL for initial setup
## Default: inr.i2p at "mainline" I2P Network
#defaulturl = http://joajgazyztfssty4w2on5oaqksz6tqoxbduy553y34mf4byv6gpq.b32.i2p/export/alive-hosts.txt
## Optional subscriptions URLs, separated by comma
#subscriptions = http://inr.i2p/export/alive-hosts.txt,http://stats.i2p/cgi-bin/newhosts.txt,http://rus.i2p/hosts.txt

[limits]
## Maximum active transit sessions (default:2500)
# transittunnels = 2500
## Limit number of open file descriptors (0 - use system limit)
# openfiles = 0
## Maximum size of corefile in Kb (0 - use system limit)
# coresize = 0
## Threshold to start probabalistic backoff with ntcp sessions (0 - use system limit)
# ntcpsoft = 0
## Maximum number of ntcp sessions (0 - use system limit)
# ntcphard = 0

[trust]
## Enable explicit trust options. false by default
# enabled = true
## Make direct I2P connections only to routers in specified Family.
# family = MyFamily
## Make direct I2P connections only to routers specified here. Comma separated list of base64 identities.
# routers =
## Should we hide our router from other routers? false by default
# hidden = true

[exploratory]
## Exploratory tunnels settings with default values
# inbound.length = 2
# inbound.quantity = 3
# outbound.length = 2
# outbound.quantity = 3

[persist]
## Save peer profiles on disk (default: true)
profiles = true
r4sas commented 4 years ago

If you running i2pd from systemctl as service, you must comment out daemon = true.

NTCP is deprecated whole exchange now preferred via NTCP2. Also NTCP is less secure, so I recommend to disable it (or just comment it out too).

If you want your router be floodfill, you must set bandwidth at least P (i2pd limitation, will be changed in future to lesser value; router will automaticly set P anyway for now).

upnp.enabled is not required on server (no one will set up UPnP daemon on VPS host node), you can comment it out.

Why you enabled zipfile = /path/to/netDb.zip? That's why i2pd can't download initial routers (reseed). Comment it out or provide correct path to reseed file downloaded to local machine.

zoonderkins commented 4 years ago

Thanks for your help I enable the port that you mentioned and disable NTCP, UPNP, Daemon, switched bandwidth = P now it became like this, means working now? image

r4sas commented 4 years ago

Yes, now it works and connected to i2p. You can check it using curl for example, by trying load any page. As example: curl -x http://httpproxy_address:4444/ http://repo.r4sas.i2p/.help-i2p/readme.txt