Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Ubuntu 10.04 | VPS

Hi guys, I'm setting up a VPS server running Ubuntu 10.04 and I presently just want to allow ssh.

I thought the following ufw commands would work...

ufw default deny
ufw allow 22
ufw allow from <local IP of vps>
ufw enable

SSH works fine. But established sessions seem to be blocked -- the vps host can't ping other servers, perform DNS queries, etc. How do I tell ufw that it's OK for the server to send OUTBOUND requests anywhere while still remaining protected?


In response to andol's question, here are the results of ufw status verbose:

Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing)
New profiles: skip

To                         Action      From
--                         ------      ----
10022                      ALLOW IN    Anywhere
Anywhere                   ALLOW IN    <local IP>

Obviously the second rule is wrong so I deleted it and the problem still persists.

share|improve this question
    
What does "ufw status verbose" give you? –  andol Jul 4 '10 at 7:26
    
@andol Output in description. –  Mike B Jul 4 '10 at 7:37
    
The default "allow (outgoing)" should really take care of just that. Does everything work as it should when you disable ufw on the VPS? –  andol Jul 4 '10 at 7:55

1 Answer 1

up vote 3 down vote accepted

I think I found the problem. Apparently, UFW doesn't work well with OpenVZ hosts... more info here: http://blog.bodhizazen.net/uncategorized/how-to-use-ufw-in-openvz-templates/

share|improve this answer
    
Yeah, once you leave userspace a OpenVZ guest can behave a bit special... –  andol Jul 4 '10 at 8:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.