For the accurate optical experiments of a certain closed container,the hermetical device for the optical fibers through the closed container is required to resist a high pressure shock wave which is nearly 2 MPa.A hermetical device was designed by pouring sealant directly on the naked optical fibers.Through installing more than one sealant pouring canisters in the hermetical device and selecting the rational inner diameter of the sealant pouring canisiers and the rational length of the fiber section with sealant,the sealing and pressure resistance capacity of the hermetical device was improved.The test results show that the leak rate of the designed hermetical device of fiber is less than 10-9 Pa·m3/s,it can bear the shock of the pressure of 2 MPa,and the light signal attenuation through this hermetical device is less than 1 dB.