Discussion:
[Simh] NAT
Ken Wiebe
2018-09-12 05:53:22 UTC
Permalink
Hi,

I've successfully used "attach xq nat:" command with VAX, with and
without the tcp port mapping as shown in the example:
sim> attach xq nat:tcp=2323:10.0.2.15:23,tcp=2121:10.0.2.15:21

Questions though:

Even though it worked, I don't fully understand each part of the above
syntax. Can someone break it down?
The only part that seems clear to me is the last piece, where you're
linking to the port (21) the emulated machine is listening on. And I
know the 2323 is the port opened on localhost to map to 21. But what is
the port 23 and port 2121 doing in the middle?
So if I wanted to add a map for SMTP (port 25), it would be this?

sim> attach xq nat:tcp=2327:10.0.2.15:27,tcp=2125:10.0.2.15:25

Also, How would one go about mapping multiple ports?

Can there be multiple "attach xq nat:" commands issued to
accomplish, i.e.:
sim> attach xq nat:tcp=2323:10.0.2.15:23,tcp=2121:10.0.2.15:21
sim> attach xq nat:tcp=2327:10.0.2.15:27,tcp=2125:10.0.2.15:25
etc.

Thanks!
Mark Pizzolato
2018-09-12 12:47:01 UTC
Permalink
Hi Ken,

The example you're using IS ALREADY mapping multiple ports. It is mapping host port 2323 to simulated system port 23 AND host port 2121 to simulated system port 21. This maps telnet (on port 23) and ftp (on port 21).

You can add additional mappings on the same command line up to some reasonably large command line length limit.

- Mark


On Sep 11, 2018 10:54 PM, Ken Wiebe <***@networkguy.com> wrote:
Hi,

I've successfully used "attach xq nat:" command with VAX, with and without the tcp port mapping as shown in the example:

sim> attach xq nat:tcp=2323:10.0.2.15:23,tcp=2121:10.0.2.15:21

Questions though:

Even though it worked, I don't fully understand each part of the above syntax. Can someone break it down?

The only part that seems clear to me is the last piece, where you're linking to the port (21) the emulated machine is listening on. And I know the 2323 is the port opened on localhost to map to 21. But what is the port 23 and port 2121 doing in the middle?

So if I wanted to add a map for SMTP (port 25), it would be this?

sim> attach xq nat:tcp=2327:10.0.2.15:27,tcp=2125:10.0.2.15:25

Also, How would one go about mapping multiple ports?

Can there be multiple "attach xq nat:" commands issued to accomplish, i.e.:

sim> attach xq nat:tcp=2323:10.0.2.15:23,tcp=2121:10.0.2.15:21
sim> attach xq nat:tcp=2327:10.0.2.15:27,tcp=2125:10.0.2.15:25
etc.

Thanks!
Ken Wiebe
2018-09-12 15:19:45 UTC
Permalink
Hi Mark,

Thanks for pointing that out. Duh. I think I was up too late
last night.
Ken
Post by Mark Pizzolato
Hi Ken,
The example you're using IS ALREADY mapping multiple ports. It is
mapping host port 2323 to simulated system port 23 AND host port 2121
to simulated system port 21. This maps telnet (on port 23) and ftp
(on port 21).>
You can add additional mappings on the same command line up to some
reasonably large command line length limit.>
- Mark
Post by Ken Wiebe
Hi,
I've successfully used "attach xq nat:" command with VAX, with and
without the tcp port mapping as shown in the example:>>
sim> attach xq nat:tcp=2323:10.0.2.15:23,tcp=2121:10.0.2.15:21
Even though it worked, I don't fully understand each part of the
above syntax. Can someone break it down?>>
The only part that seems clear to me is the last piece, where you're
linking to the port (21) the emulated machine is listening on. And I
know the 2323 is the port opened on localhost to map to 21. But what
is the port 23 and port 2121 doing in the middle?>>
So if I wanted to add a map for SMTP (port 25), it would be this?
sim> attach xq nat:tcp=2327:10.0.2.15:27,tcp=2125:10.0.2.15:25
Also, How would one go about mapping multiple ports?
Can there be multiple "attach xq nat:" commands issued to
accomplish, i.e.:>>
sim> attach xq nat:tcp=2323:10.0.2.15:23,tcp=2121:10.0.2.15:21
sim> attach xq nat:tcp=2327:10.0.2.15:27,tcp=2125:10.0.2.15:25
etc.
Thanks!
Loading...