—We consider an amplify-and-forward scheme for two-way relaying over OFDM, in which two nodes wish to exchange information via a relay. Assuming full channel knowledge, we perform power allocation for the relay and both informationexchanging nodes, as well as tone permutation at the relay, so as to maximize the sum capacity. A dual decomposition technique is employed for power allocation, while a greedy approach is proposed for tone permutation. In particular, we explore an interesting water-filling behavior displayed by this power allocation solution. Numerical results demonstrate that substantial capacity gains are achieved by implementing the two proposed solutions, either individually or successively.