Did you mean ```!privateaddress.nil?``` ? Was there a specific case where privateaddress might be nil here?

Maybe this check could be factored out, Dan suggests:

```
def private_addr?(address)
  address.to_ip.scope =~ /PRIVATE/
end

def tunnel_iface?(interface)
  interface['type'] == 'ppp'
end

# SNIP
interface["addresses"].each do |address|
  if private_addr?(address) and !tunnel_iface(interface)
    # do something here
  end
end
```