I can reach the application from http://192.168.1.7 but when I do a ping from the application it comes from adress 192.168.1.4. How can I make it to come from 192.168.1.7?
I didn’t even know about this. I tried now and worked. I only added the label without the static subnet. If you made it a topic in Tips & HowTos that would quickly become a frequently referred topic. I couldn’t find it in the documentation even though it seems it has been there for years:
I guess the problem is that you have a single interface with multiple ip addresses. So the traffic will go to the interface which has the ip address set in the label but it will still go through that single interface so the remote will see the default ip. You could try to create separate interfaces for the ip addresses.
I also edited your post as your previous post before. Please, format your posts according to the following guide: How to format your forum posts
In short: please, use </> button to share codes, terminal outputs, error messages or anything that can contain special characters which would be interpreted by the MarkDown filter. Use the preview feature to make sure your text is formatted as you would expect it and check your post after you have sent it so you can still fix it.
My Docker version is 24.0.5
OS is Ubuntu 22.04
I installed it two weeks ago and applied all patches.
How do I setup another interface on the same subnet?
the interface I have is ens160. I added another interface ens192.
Here are my netplan config before adding the new interface:
When I exec into it and run a ping I can see in our firewall that the ping comes from 192.168.1.7 and the ping is allowed by the firewall but I do not get any responce on the ping.
Another thing i noticed is that the container gets ip-adress 192.168.1.2. That address is used by another server in our network.
When i put the
networks:
default:
....
section in the compose for phpipam and starts it ant exec into phpipam web and do a ping it comes from ip 192.168.1.4.
Why does it come from 192168.1.7 when i have it in one compose and not in another?
With this configuration you assigned the lan’s subnet to the bridge’s IP Address Management. It is not designed to be used like this. It must be a different subnet than the lan’s subnet.
If you look at the example of @bluepuma77 , he specified a subnet that is not in the lan’s subnet.