Commit ff4183e6 authored by insun park's avatar insun park
Browse files
parents 14c42640 d1baec7d
......@@ -47,7 +47,7 @@ COPY Vagrantfile /opt/win10/
COPY startup.sh /usr/local/bin/startup.sh
RUN chmod +x /usr/local/bin/startup.sh
EXPOSE 3389
EXPOSE 3389 8090
# 13. Set the entrypoint
CMD ["/usr/local/bin/startup.sh"]
......@@ -13,5 +13,7 @@ services:
- /dev/net/tun
ports:
- "33890:3389"
- "8081:8090"
volumes:
- /lib/modules:/lib/modules:ro
......@@ -57,11 +57,17 @@ modprobe xt_conntrack
iptables -t nat -A PREROUTING -p tcp --dport 3389 -j DNAT --to-destination "$VM_IP":3389
iptables -t nat -A POSTROUTING -j MASQUERADE
iptables -t nat -A PREROUTING -p tcp --dport 8090 -j DNAT --to-destination "$VM_IP":8090
iptables -t nat -A POSTROUTING -j MASQUERADE
# Configure RDP forwarding inside the container
echo "Allowing RDP forwarding to the VM..."
iptables -I FORWARD -d "$VM_IP" -p tcp --dport 3389 -j ACCEPT
iptables -I FORWARD -s "$VM_IP" -j ACCEPT
iptables -I FORWARD -d "$VM_IP" -p tcp --dport 8090 -j ACCEPT
iptables -I FORWARD -s "$VM_IP" -j ACCEPT
# Keep the container running to maintain the VM session
echo "Windows VM is running. You can connect via RDP at $VM_IP."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment