Advertisement
Guest User

Untitled

a guest
Jul 12th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. [root@anon ~]# iptables -A INPUT -p tcp --dport 21 -j ACCEPT
  2. [root@anon ~]# iptables -A OUTPUT -p tcp --sport 20 -j ACCEPT
  3. [root@anon ~]# service iptables save
  4. iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
  5. [root@anon ~]# systemctl stop vsftpd
  6. [root@anon ~]# systemctl restart iptables
  7. [root@anon ~]# systemctl start vsftpd
  8. [root@anon ~]# systemctl status vsftpd
  9. ● vsftpd.service - Vsftpd ftp daemon
  10. Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor preset: disabled)
  11. Active: active (running) since Fri 2019-07-12 20:33:17 UTC; 7s ago
  12. Process: 878 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=0/SUCCESS)
  13. Main PID: 879 (vsftpd)
  14. CGroup: /system.slice/vsftpd.service
  15. └─879 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
  16.  
  17. Jul 12 20:33:17 anon systemd[1]: Starting Vsftpd ftp daemon...
  18. Jul 12 20:33:17 anon systemd[1]: Started Vsftpd ftp daemon.
  19. [root@anon ~]# iptables -L
  20. Chain INPUT (policy ACCEPT)
  21. target prot opt source destination
  22. ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
  23. ACCEPT icmp -- anywhere anywhere
  24. ACCEPT all -- anywhere anywhere
  25. ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
  26. REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
  27. ACCEPT tcp -- anywhere anywhere tcp dpt:ftp
  28.  
  29. Chain FORWARD (policy ACCEPT)
  30. target prot opt source destination
  31. REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
  32.  
  33. Chain OUTPUT (policy ACCEPT)
  34. target prot opt source destination
  35. ACCEPT tcp -- anywhere anywhere tcp spt:ftp-data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement