I have the same problem passing gas from both ends. It is very painful.
I have found some remedies of my own that help me to pass gas or burp if the gas is around my abdominal area.
I drank a a San pellegrino carbonated mineral water and that forced my gas upwards and I was able to burp with ease. You can drink clear soda as well and that works too.
As for farting it helps if you pat your stomach from abdoman to intestines. Or if you rub your intestinal area in in a downward motion near your hip bones. then pushes the gas downward and makes it easier to fart.
I hope this helps.