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

[Feature Request] How can i use the script on a machine that has multiple public IPs? #9

Closed
SkullFace141 opened this issue May 25, 2023 · 12 comments
Labels
enhancement New feature or request

Comments

@SkullFace141
Copy link

How can i use the script on a machine that has multiple public IPs?

ex: a machine with a subnet, has 1 real NIC and mutiple virtual NICs for the other IPs.

Thanks

@engageub
Copy link
Owner

engageub commented May 25, 2023

Hello,
It is possible to do but the script does not support that functionality.
Testing cannot be done here since there are currently no hosts with multiple public IPs.

Following is the example command. If the following commands work with any of the docker image, please update here.

  1. docker network create -d macvlan
    --subnet=
    --gateway=
    -o parent=<parent_interface>
    <network_name>

  2. docker run -d
    --name <container_name>
    --network <network_name>
    --ip <public_ip_address>
    <image_name>

Thank you

@engageub engageub changed the title How can i use the script on a machine that has multiple public IPs? [Feature Request] How can i use the script on a machine that has multiple public IPs? May 25, 2023
@engageub
Copy link
Owner

engageub commented May 26, 2023

Hi,
The changes will be made on this. But you are required to test it once the changes are pushed to test branch since there are no production servers available here with multiple IPs assigned to it. Proxies are different from using multiple IPs.
Also please note that if you are using IPs, proxies will not be used. It can still be done with proxy over the IP, but I don't think its required since you are using an IP directly and if you are using proxies, use the proxies directly instead of going through multiple IPs.
This is a scenario where you are using multiple connections from ISP provider and not using proxy IP address.
I would also like to let you know that docker has a theoretical limitation of 31 networks. So by default you would be able to use only 31 IPs. This can be increased by making some configuration changes.

Thank you

@engageub
Copy link
Owner

Hi,
Could you please test using the following commands for peer2profit. The IP address will be shown in the dashboard. If your NIC is already configured and network works by default. Then use the following commands.
We are creating a docker network with the NIC and using that network in docker run command.
In the following commands replace the following

<parent_interface> --> Provide your network interface name
<network_name> --> Use any name but use the same name across all commands
<your_email> --> Your peer2profit email address

sudo docker network create -d macvlan -o parent=<parent_interface> <network_name>
sudo docker  run -d  -e P2P_EMAIL=<your_email>  --name peer2profit  --network <network_name> peer2profit/peer2profit_linux:latest 

Visit your peer2profit dashboard and check if your IP address of NIC attached is visible.

To delete the above created containers run the following

sudo docker rm  -f peer2profit  
sudo docker network rm  <network_name>

If the above works fine, then it can be automated by simply using interface names.

Thank you

@engageub
Copy link
Owner

Hi,
Could you please update if the above command has been confirmed working. However there is already a working solution provided in traffmonetizer documentation.
It uses both docker network and iptables instead of single command.

https://hub.docker.com/r/traffmonetizer/cli

Thank you

@SkullFace141
Copy link
Author

please update the script to use text file for ip and interface config
example network.txt that has interface name and IP and any other needed info

@engageub
Copy link
Owner

engageub commented Jun 4, 2023

Yes, the implementation for this is not a problem. But a confirmation was required to know if the commands mentioned works for single IP on your host.

Thank you

@engageub
Copy link
Owner

engageub commented Jun 5, 2023

Gentle reminder. please confirm if you tested the three commands mentioned for peer2profit.

Thank you

@engageub
Copy link
Owner

engageub commented Jun 5, 2023

Do you have multiple IP's now or it was just a request for planning later.

Thank you

@engageub
Copy link
Owner

Could you please update on this. Did you test this yet?

Thank you

@engageub engageub added the enhancement New feature or request label Jun 25, 2023
@engageub
Copy link
Owner

@SkullFace141 ,
Gentle reminder. Any update on this.

Thank you

@SkullFace141
Copy link
Author

sorry I don't have this in my current setup

@engageub
Copy link
Owner

engageub commented Nov 6, 2023

Changes have been pushed to test branch based on the documentation for traffmonetizer.
https://hub.docker.com/r/traffmonetizer/cli_v2

This has not been tested with real machine with multiple IPs.
You may test it anytime to confirm on this.
https://github.com/engageub/InternetIncome/tree/test
I am closing this one.

Thank you

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

No branches or pull requests

2 participants