wip: Note to self: do squash.

This commit is contained in:
Alexandre Beaulieu 2019-04-15 10:06:50 -04:00
commit fd193d3f58
No known key found for this signature in database
GPG key ID: 8B02EA7AE3FC7081

View file

@ -190,12 +190,15 @@ func (mod *RdpProxy) Configure() (err error) {
} }
func (mod *RdpProxy) handleRdpConnection(payload *nfqueue.Payload) int { func (mod *RdpProxy) handleRdpConnection(payload *nfqueue.Payload) int {
log.Info("New Connection: %v", payload)
// 1. Check if the destination IP already has a PYRDP session active, if so, do nothing. // 1. Determine source and target addresses.
// 2. Otherwise: p := gopacket.NewPacket(payload, layers.LayerTypeEthernet, gopacket.NoCopy)
// 2.1. Spawn a PYRDP instance on a fresh port
// 2.2. Add a NAT rule in the firewall for this particular target IP log.Info("New Connection: %v", payload)
// 2. Check if the destination IP already has a PYRDP session active, if so, do nothing.
// 3. Otherwise:
// 3.1. Spawn a PYRDP instance on a fresh port
// 3.2. Add a NAT rule in the firewall for this particular target IP
// Force a retransmit to trigger the new firewall rules. // Force a retransmit to trigger the new firewall rules.
// TODO: Find a more efficient way to do this. // TODO: Find a more efficient way to do this.
payload.SetVerdict(nfqueue.NF_DROP) payload.SetVerdict(nfqueue.NF_DROP)