Japan invaded Southeast Asia and Indonesia to obtain rubber in WWII. Germany and Italy clearly used large amounts of rubber in WWII to build vehicles and planes, but in the 1940s rubber was only available in South America, central Africa, and Southeast Asia, which the European Axis lacked access to, and any shipments of rubber would have been stopped by the allies' massive naval superiority. So how did Germany and Italy have enough rubber to manufacture war equipment?
For most of the war, the main supply of rubber for Germany and Italy was synthetic rubber. They were able to obtain some natural rubber from Japanese controlled Southeast Asia via the Soviet Union (until June 1941) and limited (by blockades) amounts via shipping. There were also pre-war stockpiles, while some was seized from French stockpiles and a small amount was recoverable from cars. Efforts to cultivate Russian dandelion in occupied Soviet territory produced only small amounts of rubber.
The Western democracies controlled about 93% of the world's production of natural rubber. Around 77% was from plantations in British Malaya and the Netherlands East Indies,...
Source: John Tully, 'The Devil's Milk: A Social History of Rubber'
However, both Germany and Italy had adopted a policy of autarky (economic self-sufficiency) and had invested in synthetic rubber. There were a few other sources of rubber, but shortages were inevitable. The problem for the Axis powers was that, although Japan controlled much of the world's natural rubber from 1942, blockades and Allied control of critical sea routes made shipping it to their German and Italian allies very difficult.
When Hitler came to power in 1933, he immediately began to plan for war. To avoid a repetition of World War I, in which Germany had faced an especially bitter defeat, he demanded autarky (economic self‐sufficiency), especially in metals and rubber....He turned to IG Farben...to refine and develop Buna for military use.
Source: Stephen L. Harp, 'A World History of Rubber: Empire, Industry, and the Everyday' (2015)
Buna, though, was very expensive compared to natural rubber but,
Hitler personally authorized a significant subsidy to bring Buna tires to market. With government support, the product became a success story, even winning a gold medal at the Paris World’s Fair in 1937. In the process, IG Farben became a critical pillar in the war economy of the Third Reich...
Source: Stephen L. Harp
Farben's synthetic rubber, made primarily from coal and limestone, was used to create a red rubber floor at the exhibition. Just how critical Buna rubbers were can be deduced from the fact that, by 1943, synthetic rubber accounted for over 90% of Germany's supply, up from just 22% in 1939 and 70% in 1940. Also,
In late 1941, German tyres contained 37% natural rubber, but this declined to around 8% in February 1943.
Source: John Tully, 'The Devil's Milk: A Social History of Rubber'
Also, both the Italians and the Germans had stockpiled natural rubber before the war, although these reserves were quickly depleted (German stockpiles were estimated at 50,000 tons by British analysts). The British blockade was very effective, but Germany was still able to obtain rubber from the Japanese via the Trans-Siberian Railway until Operation Barbarossa in June 1941 put an end to the German–Soviet Credit Agreement of 1939.
Although the Germans managed to seize French stockpiles of rubber, once the Soviets were in the Allied camp, Germany had to rely largely on blockade runners for natural rubber, bringing it from the Japanese in the Far East. But there was a problem:
Although by mid 1942 Germany and Italy had unlimited access, at least in theory, to natural rubber, shipping it safely to Europe became extremely dangerous. This situation prompted increasing cooperation between German and Italian commercial representatives in East Asia, but their options were limited. While the only viable route was now via the sea, the Allies’ blockade became so effective, especially after the introduction of the Checkmate System on 8 June 1943, that fewer and fewer Axis blockade-runners succeeded in reaching Europe. By late 1942 and early 1943, only one of the six ships that left for Europe reached its destination. As the toll of using surface ships became unbearable, this route was virtually terminated by the end of 1943.
Between 1941 and 1944, these blockade runners had only
delivered 43,983 tons of natural rubber to the German and Italian war industries.
Note that, for comparative purposes, IG Farben produced 140,000 tons of Buna in 1944 alone (by which time their factories were being heavily bombed, for example this Italian factory).
The Germans had hoped to obtain natural rubber through Vichy France as French West African colonies were under Vichy control, but Vichy wanted this for itself; that the Germans did not push harder on this would imply that the quantities were small, and it was not enough to meet even the requirements of the Vichy regime. Vichy did, though, exchange some natural rubber for German synthetic rubber.
One other source of rubber the Germans were interested in was Russian dandelion or Taraxacum kok-saghyz. The Soviets had cultivated this since 1931 as an alternative source of natural rubber to the rubber tree (hevea brasiliensis) of Southeast Asia. German-occupied Ukraine and the Baltic States had large areas of land growing Russian dandelion, around 20,000 hectares not destroyed by the enemy, but little came of it in terms of final product:
the Nazi conquerors ordered peasants on collective farms to maintain fields of kok-saghyz, and soon ratcheted up the pressure. After Heinrich Himmler had won overall control over production for his SS empire in July 1943, he ordered the rounding up of women and children in partisan zones of eastern Europe to grow the crop, and the mobilisation of school children. In 1944, prisoners, juvenile delinquents, orphans, the deaf and dumb and Russian refugees from Stalinism were all pressed into service in the Baltic States. How many people died pursuing Himmler’s phantasms is not known. No more than a few hundred tons of rubber were ever delivered to the Reich.
Source: William G. Clarence-Smith, 'The Battle for Rubber in the Second World War: Cooperation and Resistance'. In Jonathan Curry-Machado (ed.), 'Global Histories, Imperial Commodities, Local Interactions' (2013)
As T.E.D. has noted in a comment, the Allies also "had issues with rubber, once the Japanese took SE Asia" in 1942. The US was by the world's largest importer of rubber (over 50% of world production, while Germany imported just 8% in 1939). The US turned to synthetic rubber and Latin America while Britain relied heavily on Sri Lanka which
became the Allies’ single largest source of natural rubber...
Africa also provided relatively small amounts of rubber for the allies, including Liberia, the Belgian Congo and various British colonies. Much of the pre-war production capacity in SE Asia was simply not utilized; Japan couldn't use it all, and nor were they able to ship significant amounts to their allies.