networking – Share internet through otg-ethernet from terminal

I know other threads already exist but none of them answer this specifically.

My OTG ethernet cable works only when used as a client, i.e. when a DHCP server is recognized.

I want to be able to share my 4G connexion to a router trough the WAN port. Android doesn’t support this natively, so I’m guessing I’ll have to create my own AP but I’m not sure exactly how do that trough the terminal.

I’m guessing there is some NAT involved.