For the second MN with the same IP use the same settings like the first MN.
You must only set a port for the second MN.
Looks like this:
rpcuser=xxx
rpcpassword=xxx
rpcallowip=127.0.0.1
daemon=1
server=1
listen=1
port="what ever you want"
masternode=1
masternodeprivkey="your MN Private Key"
masternodeaddr=18.x.x.x:9399
You see, the same setting but with the command "port=" can you set up another port for the wallet and it works fine.
i run a lot MN with this setup and all its ok.
you have problems with that than contact me.