Hello.
There is a rootless podman container.
The task is to make sure that there is no default route inside the container, but there is a network and access to the Internet.
Internet access means access to the router subnet: 192.168.1.0/24.
The following options do not help:
--network pasta:--no-map-gw
--network pasta:-a,10.0.2.0,-n,24,--no-map-gw,--no-dhcp
the network is created and the default route is copied from the host.
It turns out to be done like this:
podman exec --privileged -u 0 -ti firefox bash
ip route del default
ip r add 192.168.1.0/24 dev enp0s7
But this must be done every time, which is not a convenient or smart solution.
Please tell me, is there any solution so that there is no default route?
Thank you.