This works, but:$gameport=31791
Anyone joining by IP will need to use the correct port.
If the NAT connection fails and regular port forwarding is used, the host will also need to have forwarding set up for the new port being used. (I don't know how often this happens if at all.)
Players joining by the lobby should have no problem, unless the new port is blocked for someone else.