UFW or iptables from commandline

  • I have a fresh installation of OMV 2.0 and tried to setup a firewall, but from console.


    So I apt-get install ufw and set some basic rules:
    ufw allow ssh
    ufw default deny incoming
    ufw default allow outgoing
    ufw enable


    Everything was working normal, but after reboot, there was no internet connection. I had to login to console and disable firewall - then it started working.


    I also tried with iptables from console:
    iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
    iptables -A INPUT -p tcp --dport 22 -j ACCEPT
    iptables -A INPUT -p tcp --dport 80 -j ACCEPT
    iptables -I INPUT 1 -i lo -j ACCEPT
    iptables -P INPUT DROP
    iptables -A INPUT -j DROP


    Again - everything is working fine, but after reboot, no internet from the machine.


    In fact, I am using OpenVPN client on the device, and since there is no internet, it cannot login. After I say iptables -L, openvpn connection is established normally.


    It seems something is disabling internet when I set up firewall manually... maybe OMV is interfereing with comman-line firewalls in some way?

  • If you want to connect to the OMV box via OpenVPN you need to open port 1194 in the firewall settings. Or did I misunderstand your description?

    OMV 2.x - Kralizec // Hardware: HP Microserver N54L, 4GB RAM, 2x3TB WD Red - RAID 1, Sandisk SSD 60GB for system

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!