# PF freezes Tightvnc



## blazingice (Aug 12, 2013)

I have a virtual machine running FreeBSD with OpenBox. I am able to access X11 remotely by using tightvnc. I am also tunneling tightvnc through ssh. Everything works fine. However when I enable pf I have some weird problems with tighvnc. I can still connect to tightvnc, but the screen is grayed. When I move the mouse around the screen gets pixelated which starts showing the correct desktop. Sometimes it freezes completely and I lose connection. This is my pf.conf:


```
# Tables
########
table <sshguard> persist

# Normalizing
#############
set skip on lo0
scrub in all

# Filter
########
antispoof quick for em0 inet

# sshguard
block drop in log quick on em0 inet from <sshguard> to any

# ssh
pass in quick on em0 proto tcp from any to any port 22 keep state

# Block everything else
block in log quick all

# Allow everything out
pass out quick on em0 all keep state
```

I tunnel tightvnc through ssh: `ssh -L 5901:localhost:5901 user@remotehost`. Then using Ultravnc viewer from Windows I enter `localhost:5901`. I even tried allowing a direct connection to vncserver to check if the problem was with tunneling:


```
pass in quick on em0 proto tcp from any to any port 5901 keep state
```

I still get the same problem. I can connect to vncserver, so pf is not blocking the connection, but I continue to get the same problem as described above. 

When I disable pf, everything works fine both direct connection and tunneling through ssh. It seems that pf is doing something else, but I can't figure out what.

Any suggestions?

Thanks.


----------



## blazingice (Aug 12, 2013)

I have included a screenshot of the problem. 

The change of pixels is as a result of mouse movements.


----------

