Results 1 to 1 of 1

Thread: netfilter-persistent and iptables

  1. #1
    Join Date
    May 2020
    Beans
    1

    netfilter-persistent and iptables

    Dear community,

    Desiring to use iptables on ubuntu 18.04, I removed the ufw and installed iptables-persistent netfilter-persistent. Edited the /etc/iptables/rules.v4 and tried to start the netfilter-persistent service. It's working, but the last exit status is not 0, probably something's wrong when stopping the service


    iptables -nL output:
    Code:
    
    Chain INPUT (policy DROP)
    target     prot opt source               destination         
    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
    ACCEPT     tcp  --  192.168.1.129        0.0.0.0/0            tcp dpt:22
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination         
    
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination      
    status of the service:
    Code:
    root@my-server:/etc/iptables# systemctl status netfilter-persistent
    ● netfilter-persistent.service - netfilter persistent configuration
       Loaded: loaded (/lib/systemd/system/netfilter-persistent.service; enabled; vendor preset: enabled)
       Active: active (exited) since Tue 2020-05-26 12:39:17 UTC; 19min ago
      Process: 4402 ExecStop=/usr/sbin/netfilter-persistent stop (code=exited, status=1/FAILURE)
      Process: 4408 ExecStart=/usr/sbin/netfilter-persistent start (code=exited, status=0/SUCCESS)
     Main PID: 4408 (code=exited, status=0/SUCCESS)
    
    
    May 26 12:39:17 my-webserver systemd[1]: Starting netfilter persistent configuration...
    May 26 12:39:17 my-webserver netfilter-persistent[4408]: run-parts: executing /usr/share/netfilter-persistent/plugins.d/15-ip4tables start
    May 26 12:39:17 my-webserver netfilter-persistent[4408]: run-parts: executing /usr/share/netfilter-persistent/plugins.d/25-ip6tables start
    May 26 12:39:17 my-webserver systemd[1]: Started netfilter persistent configuration.
    journalctl -e -u netfilter-persistent.service

    Code:
    
    May 26 12:39:01 my-webserver systemd[1]: Started netfilter persistent configuration.
    May 26 12:39:17 my-webserver systemd[1]: Stopping netfilter persistent configuration...
    May 26 12:39:17 my-webserver netfilter-persistent[4402]: Automatic flush disabled; use '/usr/sbin/netfilter-persistent flush'
    May 26 12:39:17 my-webserver systemd[1]: netfilter-persistent.service: Control process exited, code=exited status=1
    May 26 12:39:17 my-webserver systemd[1]: netfilter-persistent.service: Failed with result 'exit-code'.
    May 26 12:39:17 my-webserver systemd[1]: Stopped netfilter persistent configuration.
    May 26 12:39:17 my-webserver systemd[1]: Starting netfilter persistent configuration...
    May 26 12:39:17 my-webserver netfilter-persistent[4408]: run-parts: executing /usr/share/netfilter-persistent/plugins.d/15-ip4tables start
    May 26 12:39:17 my-webserver netfilter-persistent[4408]: run-parts: executing /usr/share/netfilter-persistent/plugins.d/25-ip6tables start
    May 26 12:39:17 my-webserver systemd[1]: Started netfilter persistent configuration.
    
    Last edited by catadetest; May 27th, 2020 at 08:56 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •