The Australian mainland came under attack during 1942 and 1943 . Japanese submarines operated off Australia from May to August 1942 and January to June 1943 . These attacks sought to cut the Allied supply lines between Australia and the US and Australia and New Guinea , but were unsuccessful . Japanese aircraft also conducted air raids against Allied bases in northern Australia which were being used to mount the North Western Area Campaign against Japanese positions in the Netherlands East Indies ( NEI ) .