Hi @Pargat
You may be entitled to a residence permit as the parent of a German child. However, it is not enough to just be the father (confirmed by having the ‘Vaterschaftsanerkennung’) but also to have custody (Sorgerecht) and care for the child. This can be either by living together with the child or providing financial support and having regular contact with your child.
The relevant section of the law is paragraph 28, section 1, number 3 of the Aufenthaltsgesetz, here in online translation:
https://***-gesetze--im--internet-de.translate.goog/aufenthg_2004/__28.html?_x_tr_sl=de&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp
You therefore apply for a residence permit in accordance with this paragraph with your local immigration office (Ausländerbehörde).
Staying in Germany illegally is a crime and you may be prosecuted for this. Also if you came to Germany illegally, which is likewise a criminal offence.
You may also be told that you can be issued with a residence permit but only if you first leave Germany and return with the correct visa for family reunification. Depending on the age of your child, you can argue that this is an unreasonable requirement and that you should be given the permit without having to leave the country.
Best,
Éanna