赞
踩
- iptables -A INPUT -s sip -d dip -p tcp --dport 2222 -j ACCEPT
- iptables -A OUTPUT -d dip -d dip -p tcp --sport 2222 -j ACCEPT
iptables-save > /etc/iptables.up.rules
- #!/bin/sh
- /sbin/iptables-restore < /etc/iptables.up.rules
chmod +x /etc/network/if-pre-up.d/iptables
iptables-save > /etc/iptables.up.rules
echo port 2222 >> /etc/ssh/sshd_config
systemctl restart sshd
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。