
Paternity & The Military
Being in the military does not create any particular rules for establishing paternity. Commanders cannot order servicemembers to support children born out of wedlock absent a court order, and they cannot order a servicemember to undergo a DNA test (again, that's a civilian court matter).
Child Support
DOD Directive 1344.03. The Department of Defense will honor court orders for support.
Each of the services' family support regulations have similar clauses - military family support is only payable if there is a court order adjudicating paternity. A voluntary acknowledgment of paternity is not sufficient. See the regulations cited in Military Family Support for more information.
ID Cards & Military Benefits
The services all have a jointly-published regulation governing the issuance of ID cards. Though the terms are identical, it's known as Air Force Instruction 36-3026(I), Army Regulation 600-8-14, BUPERS Instruction 1750.10B, Marine Corps Order P5512.11C, and Commandant Instruction M5512.1.
Para. 4.9 provides that it takes a court order for a male servicemember to establish paternity over a child. An acknowledgment of paternity, or being on the birth certificate, is not sufficient. (A female servicemember, for obvious reasons, need only present the child's birth certificate). To obtain an ID card, the servicemember needs to complete a DD Form 1172, Application for Uniformed Services Identification Card DEERS Enrollment.