Basically, the stains under the toilet rim are minerals that have stuck to the porcelain. They make a pretty tight bond so you need to dissolve them with acid to remove them. Rust removers are acidic. Vinegar is acetic acid. You can also try lemon juice which is citric acid. For stains...