Rochester is closer: ~30 miles (48 km) southeast of central London.
Dover is ~70 miles (113 km) southeast.
Both are in Kent, but Rochester lies on the Medway, while Dover is the Channel port.