Differences between revisions 4 and 5
Revision 4 as of 2013-08-09 00:44:00
Size: 461
Editor: scot
Comment:
Revision 5 as of 2013-08-09 01:15:48
Size: 1388
Editor: scot
Comment:
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
In order for you to do port forwarding for your server, you must setup the iptable rules. I'll give you a separate video for that. In order for you to do port forwarding for your server, you must setup the iptable rules. We need to pieces of functionality:

 1. NAT
 1. Port forwarding 3389 -> 192.168.1.2:3389 and 3390 --> 192.168.1.3:3389

To setup NAT on Ubuntu, see [[https://help.ubuntu.com/community/Internet/ConnectionSharing#Ubuntu_Internet_Gateway_Method_.28iptables.29|Ubuntu NAT]]. We'll add a short bit of instructions to the system to forward the ports as follows:

{{{
#Port Forwarding Stuff:
iptables -t nat -A PREROUTING -i eth0 -p tcp -d 216.249.119.[your ip] --sport 1024:65535 --dport 3389 -j DNAT --to-destination 192.168.1.2
iptables -t nat -A PREROUTING -i eth1 -p tcp -d 216.249.119.[your ip] --sport 1024:65535 --dport 3389 -j DNAT --to-destination 192.168.1.2
iptables -t nat -A PREROUTING -i eth0 -p tcp -d 216.249.119.[your ip] --sport 1024:65535 --dport 3390 -j DNAT --to-destination 192.168.1.3:3389
iptables -t nat -A PREROUTING -i eth1 -p tcp -d 216.249.119.[your ip] --sport 1024:65535 --dport 3390 -j DNAT --to-destination 192.168.1.3:3389
}}}

Virtual Network Configuration

Below is a diagram that shows how your virtual network sees the world and how the world sees it. We have eliminated for the moment the complications of the <<latex($\mu$)>>Cloud. The IP address 216.249.119.123 is a place holder for your IP address.

Network Diagram.png

In order for you to do port forwarding for your server, you must setup the iptable rules. We need to pieces of functionality:

  1. NAT
  2. Port forwarding 3389 -> 192.168.1.2:3389 and 3390 --> 192.168.1.3:3389

To setup NAT on Ubuntu, see Ubuntu NAT. We'll add a short bit of instructions to the system to forward the ports as follows:

#Port Forwarding Stuff:
iptables -t nat -A PREROUTING -i eth0 -p tcp -d 216.249.119.[your ip] --sport 1024:65535 --dport 3389 -j DNAT --to-destination 192.168.1.2
iptables -t nat -A PREROUTING -i eth1 -p tcp -d 216.249.119.[your ip] --sport 1024:65535 --dport 3389 -j DNAT --to-destination 192.168.1.2
iptables -t nat -A PREROUTING -i eth0 -p tcp -d 216.249.119.[your ip] --sport 1024:65535 --dport 3390 -j DNAT --to-destination 192.168.1.3:3389
iptables -t nat -A PREROUTING -i eth1 -p tcp -d 216.249.119.[your ip] --sport 1024:65535 --dport 3390 -j DNAT --to-destination 192.168.1.3:3389

WindowsAdministration/VirtualNetworkConfiguration (last edited 2021-08-26 16:49:18 by scot)