Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@anon ~]# iptables -A INPUT -p tcp --dport 21 -j ACCEPT
- [root@anon ~]# iptables -A OUTPUT -p tcp --sport 20 -j ACCEPT
- [root@anon ~]# service iptables save
- iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
- [root@anon ~]# systemctl stop vsftpd
- [root@anon ~]# systemctl restart iptables
- [root@anon ~]# systemctl start vsftpd
- [root@anon ~]# systemctl status vsftpd
- ● vsftpd.service - Vsftpd ftp daemon
- Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor preset: disabled)
- Active: active (running) since Fri 2019-07-12 20:33:17 UTC; 7s ago
- Process: 878 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=0/SUCCESS)
- Main PID: 879 (vsftpd)
- CGroup: /system.slice/vsftpd.service
- └─879 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
- Jul 12 20:33:17 anon systemd[1]: Starting Vsftpd ftp daemon...
- Jul 12 20:33:17 anon systemd[1]: Started Vsftpd ftp daemon.
- [root@anon ~]# iptables -L
- Chain INPUT (policy ACCEPT)
- target prot opt source destination
- ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
- ACCEPT icmp -- anywhere anywhere
- ACCEPT all -- anywhere anywhere
- ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
- REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
- ACCEPT tcp -- anywhere anywhere tcp dpt:ftp
- Chain FORWARD (policy ACCEPT)
- target prot opt source destination
- REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
- Chain OUTPUT (policy ACCEPT)
- target prot opt source destination
- ACCEPT tcp -- anywhere anywhere tcp spt:ftp-data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement