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

[Question]: two network adapter #972

Open
2 tasks done
titov32 opened this issue Dec 16, 2024 · 1 comment
Open
2 tasks done

[Question]: two network adapter #972

titov32 opened this issue Dec 16, 2024 · 1 comment
Labels
question Further information is requested

Comments

@titov32
Copy link

titov32 commented Dec 16, 2024

Is your question not already answered in the FAQ?

  • I made sure the question is not listed in the FAQ.

Is this a general question and not a technical issue?

  • I am sure my question is not about a technical issue.

Question

I noticed that regardless of how many networks are specified, only one network adapter is mounted on a Windows machine. I have a case where I need to run Windows with two or more network cards, and I need the networks in the 'network' section of the docker-compose.yml file to correspond with the addresses in the Windows virtual machine. The software relies on the machine's network interfaces. How can this be done?

@titov32 titov32 added the question Further information is requested label Dec 16, 2024
@titov32
Copy link
Author

titov32 commented Dec 20, 2024

I found a solution that works only when you manually enter the commands for now. For a working solution, the scripts need to be modified. Here are the commands that need to be entered to forward traffic from eth1(address container 10.3.1.15) to Windows as well.

 iptables -t nat -A PREROUTING -i eth1 -d 10.3.1.15 -p tcp -j DNAT --to 20.20.20.21
 iptables -t nat -A PREROUTING -i eth1 -d 10.3.1.15 -p udp -j DNAT --to 20.20.20.21

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

No branches or pull requests

1 participant