A shock absorber for a dishwasher includes a tub having a separation-prevention member protruding from an inner surface of the tub and a guide rail provided at a lower portion of the separation-prevention member to guide the moving casters and a rack having moving casters configured to facilitate a movement of the rack, the shock absorber comprising: a body; at least two receiving grooves (351, 361) in a first side surface of the body, wherein the at least two receiving grooves (351, 361) are configured to receive a portion of the rack to restrict rotation of the body, and a pressing portion provided on a second side surface of the body opposite to the first side surface, the pressing portion configured to exert a downward force on the body in response to being pressed against a portion of the tub, wherein the pressing portion is inserted into a space between the separation-prevention member and the guide rail, the separation-prevention member configured to confine a movement of the moving casters in an upward direction and to contact the pressing portion, and wherein the pressing portion is configured to press a lower portion of the separation-prevention member in the upward direction, wherein the pressing portion comprises an upper inclined surface provided at an upper portion of the pressing portion, the upper inclined surface extending outwardly and downwardly from the second side surface of the body, wherein the pressing portion further comprises: a mounting surface provided at a lower portion of the pressing portion, the mounting surface configured to be mounted on the guide rail; and a lower inclined surface extending inwardly and downwardly from the mounting surface toward the first side surface of the body. a body; at least two receiving grooves (351, 361) in a first side surface of the body, wherein the at least two receiving grooves (351, 361) are configured to receive a portion of the rack to restrict rotation of the body, and a pressing portion provided on a second side surface of the body opposite to the first side surface, the pressing portion configured to exert a downward force on the body in response to being pressed against a portion of the tub, wherein the pressing portion is inserted into a space between the separation-prevention member and the guide rail, the separation-prevention member configured to confine a movement of the moving casters in an upward direction and to contact the pressing portion, and wherein the pressing portion is configured to press a lower portion of the separation-prevention member in the upward direction, wherein the pressing portion comprises an upper inclined surface provided at an upper portion of the pressing portion, the upper inclined surface extending outwardly and downwardly from the second side surface of the body, wherein the pressing portion further comprises: a mounting surface provided at a lower portion of the pressing portion, the mounting surface configured to be mounted on the guide rail; and a lower inclined surface extending inwardly and downwardly from the mounting surface toward the first side surface of the body. a mounting surface provided at a lower portion of the pressing portion, the mounting surface configured to be mounted on the guide rail; and a lower inclined surface extending inwardly and downwardly from the mounting surface toward the first side surface of the body.