...
코드 블럭 | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="utf-8"?> <zone target="ACCEPT"> <short>Trusted</short> <source address="192.168.0.0/24"/> <service name="ssh"/> <service name="dhcpv6-client"/> <service name="http"/> <service name="https"/> <port port="1122" protocol="tcp"/> <port port="2222" protocol="tcp"/> <port port="9090" protocol="tcp"/> </zone> |
코드 블럭 | ||
---|---|---|
| ||
# vi /etc/firewalld/zones/public.xml # vi /etc/firewalld/zones/trusted.xml # firewall-cmd --reload # firewall-cmd --get-active-zones public interfaces: bridge0 enp1s0 trusted sources: 192.168.0.0/24 |
sshd
코드 블럭 | ||
---|---|---|
| ||
# vi /etc/ssh/sshd_config Port 2222 # vi /etc/passwd root:x:0:0:root:/root:/bin/bash # mkdir -p /root/.ssh # chmod 700 /root/.ssh # touch /root/.ssh/authorized_keys # chmod 600 /root/.ssh/authorized_keys # vi /root/.ssh/authorized_keys Add your ssh pubkey # systemctl enable --now ssh |
...