Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transient router id #2135

Open
hsn10 opened this issue Dec 7, 2024 · 7 comments
Open

transient router id #2135

hsn10 opened this issue Dec 7, 2024 · 7 comments

Comments

@hsn10
Copy link

hsn10 commented Dec 7, 2024

Can we have an option to automatically generate new router id at each start?

it would be enough to delete ntpc2.keys, router.keys, ssu2.keys at each start.

@bjtftw
Copy link

bjtftw commented Dec 8, 2024

For completely new i2pd profile on every start you can modify i2pd.service file (sudo systemctl edit --full i2pd.service) so "ExecStart=" will contain "--datadir=/run/i2pd" this way whole i2pd data dir is deleted when i2pd killed/stopped. Of course this removes all the data (like peers profiles, .keys, .dat), so on every i2pd start you get completely new installation behavior and need to wait some time to get i2pd fully working as you need to bootstrap into network and profile peers.

If you want only some files to be deleted on i2pd stop add ExecStopPost=+-/usr/bin/sh -c 'rm -f /I2PD_DIR/*.keys' action. Replace I2PD_DIR with directory where your i2pd store .keys (I don't remember original path, probably /var/lib/i2pd/).

@Vort
Copy link
Contributor

Vort commented Dec 8, 2024

Why this feature is needed?

@orignal
Copy link
Contributor

orignal commented Dec 8, 2024

A new router takes much time for integration to the network, because other routers don't have it in their profiles yet.

@hsn10
Copy link
Author

hsn10 commented Dec 10, 2024

feature is needed to make network analysis harder.
Integration time is good enough, it doesn't seems to have any negative effect. After 15 minutes everything runs well.

@hsn10
Copy link
Author

hsn10 commented Dec 28, 2024

I did additional testing and after deleting router state (router id, interface addresses, socks5 keys) it takes between 6 to 8 minutes until rest of network can connect back to you. It is reasonable price for increased security.

@orignal
Copy link
Contributor

orignal commented Dec 29, 2024

And how many problems have you created for other routers? Their NetDb is full of non-existing routers. If you change router ident often, your IP could be banned as possible attacker.

@anikey-from-i2p
Copy link

Can we have an option to automatically generate new router id at each start?

orignal, the main developer, already said above that it is not good. Not good for both you and the network as a whole.

it would be enough to delete ntpc2.keys, router.keys, ssu2.keys at each start.

But, if you really want, you can just do that yourself, couldn't you? Is writing a simple wrapper script really that hard?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants