0

I'm trying to establish a connection with a diameter server. That server has a restriction parameter of "peer port"

Which means source port of my outgoing traffic should be restricted to a specific port.

Since I'm using an erlang diameter client, I didn't find any parameter to specify the outgoing port. It will initiate the connection with a random port to the destination ip:port.

Is there a way to translate my outgoing traffic to that ip locally to a specific port from linux?, so that the external server will see my source port as the allowed port.

ivcode
  • 235
  • 2
  • 14

1 Answers1

0

You should apply a NAT at the sender side. Read this thread, it explains how to do it with iptables.

Ariel Otilibili
  • 260
  • 1
  • 6