0

In our linux embedded application we would like to keep available ports up and running and assigning with 0.0.0.0 IP address. In short we will be executing all ports with ifconfig ethX 0.0.0.0, and setting all IP address to virtual interfaces ethX:100 20.20.20.20 is there any security issues with configuring ethX to 0.0.0.0? Is there any other issue can be faced if we configure all IP address on virtual interfaces?

Gilson PJ
  • 101
  • 6
  • 3
    This doesn't make any sense. Why are you doing this? – Michael Hampton Aug 02 '21 at 22:18
  • because of our limitation of our application framework we cannot identify which one is first and which one is victuals. so if user delete the first interface then we will take down the eth0 and that will take down all virtual interfaces. To avoid that we are planning to add all ip address to virtual – Gilson PJ Aug 03 '21 at 13:06
  • 1
    You must avoid on Linux, any use of `ifconfig` . That's a mistake to keep using `ifconfig` on Linux without understanding that aliases are not interfaces but addresses. Use `ip link` + `ip address` instead. These tools must probably be present, while `ifconfig` doesn't have to: you'd spare space on embedded. Removing a *primary* address removes all other *secondary* addresses in the same IP LAN by default. This is not related to alias addresses. If an alias address was in an other IP LAN, it would also be primary and not removed. primary is just the first defined in the IP LAN. – A.B Aug 03 '21 at 13:12
  • When we remove an IP configuration from application code it will DOWN the interface. If we DOWN virtual interface then other IP addresses will be still available. We are not allowed to use iproute2 library now :( (using iproute2 is still under investigation) – Gilson PJ Aug 04 '21 at 02:12
  • iproute2's kernel API (netlink) has been around for more than 20 years. Time to be allowed to use it... – A.B Aug 04 '21 at 02:15

0 Answers0