No internet access after config iptables
After that configuration:
iptables -P INPUT DROP
iprables -A INPUT -j DROP
iptables -P OUTPUT ACCEPT
iptables -A OUTPUT -j ACCEPT
Now can't access internet normally or through VPN. What's wrong?
Now can't access internet normally or through VPN. What's wrong?
You told your computer to drop any and all incoming packages. It's doing that. Nothing is wrong, but you told your computer do something which obviously is not what you want.
After setting the default target to DROP, you'll have to add allow rules to allow certain kinds of traffic. This may for instance be established connections:
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
Which will roughly speaking allow answers to outgoing connections. As you don't state what you want to achieve, any more accurate answers is impossible. But a suggestion would be to look into e.g. ufw, as it hides some of the complex magic from you.