# Ubuntu ### 版本 18.04 ### iptables相关 1. 是否安装iptables ```shell whereis iptables ``` 2. 查看防火墙配置信息 ```shell iptables -L ``` 3. 添加IP访问拦截 ```shell iptables -I INPUT -s 172.16.0.246 -j DROP ``` 4. 解除IP访问拦截 ```shell iptables -D INPUT -s 172.16.0.246 -j DROP ``` 5. 添加日志查看用户 ```shell useradd -m log_watcher -d /data/log -s /bin/bash passwd log_watcher wisdomcity@log ```