271. Whoever knowingly disobeys any rule lawfully made and promulgated for putting any vessel into a state of quarantine, or for regulating the intercourse of vessels in a state of quarantine with the shore or with other vessels, or for regulating the intercourse between places where an infectious disease prevails and other places, shall be punished with imprisonment for a term which may extend to six months or with fine or with both.