3일차 : vlan

교수 네트워크를 vlan2로 바꿔주기 > 스위치 콘솔로 들어가서 변경가능

[스위치 콘솔에서 설정 방법]
1) vlan 만드는 법
config t
vlan 2
name professer
exit

2) f1/2를 vlan2로 적용시켜주기
interface fastethernet1/2
switchport access vlan 2
exit

vlan이 두 개 이상으로 나누어져 있으면 라우터를 통해 통합하여 통신을 할 수 있음

3) 스위치와 라우터를 통해 모든 vlan 연결 해주는 법
interface fastethernet1/0
switch trunk allowed vlan 1-2
switch trunk access vlan 2
switchport mode trunk
exit
exit
show interface trunk 

한방설정)
config t
vlan 2
name professer
exit
interface fastethernet1/2
switchport mode access
switchport access VLAN 2
exit
interface fastethernet1/0
switchport mode trunk
exit
exit
show interface trunk



여기까지 해주어도 연결이 안됨 추가적으로 라우터에 아이피를 넣어줘야 서로 통신이 가능함 R1 라우터에 아이피 넣어주기 > pc1-2 가 서로 통신이 가능함 [라우터 콘솔에서 설정방법] config t hostname jjcom interface fastethernet0/0 ip address 192.168.0.254 255.255.255.0 no shutdown exit interface fastethernet0/0.2 encapsulation dot1q 2 native ip address 192.168.1.254 255.255.255.0 no shutdown exit 한방설정) config t hostname jjcom interface fastethernet0/0 ip address 192.168.0.254 255.255.255.0 no shutdown exit interface fastethernet0/0.2 encapsulation dot1q 2 ip address 192.168.1.254 255.255.255.0 no shutdown exit 네트워크를 나누면 보안이 강화됨 파일을 닫으면 설정이 모두 초기화되어 아이피 추가 및 한방설정으로 다시 설정을 해주어야 함
칼리 리눅스를 열었을 때 10.0.2.15 아이피인 이유 > 네트워크가 nat로 설정되어 있어서 어뎁터 브릿지로 놓으면 컴퓨터 아이피로 받아서 사용할 수 있음 > 192.168.0.122 # 칼리 root로 들어가는법 su sudo passwd < 비밀번호 변경시 사용 kali 123456 123456 su 123456 root로 변경됨 nmap -v -sS -O 192.168.1.0/24 > result.txt (아이피와 서브넷 스캔 코드) RTTVAR has grown to over 2.3 seconds, decreasing to 2.0 RTTVAR has grown to over 2.3 seconds, decreasing to 2.0 RTTVAR has grown to over 2.3 seconds, decreasing to 2.0 adjust_timeouts2: packet supposedly had rtt of 9034702 microseconds. Ignoring time. adjust_timeouts2: packet supposedly had rtt of 9034702 microseconds. Ignoring time. adjust_timeouts2: packet supposedly had rtt of 12043416 microseconds. Ignoring time. adjust_timeouts2: packet supposedly had rtt of 12043416 microseconds. Ignoring time. adjust_timeouts2: packet supposedly had rtt of 12025169 microseconds. Ignoring time. adjust_timeouts2: packet supposedly had rtt of 12025169 microseconds. Ignoring time. adjust_timeouts2: packet supposedly had rtt of 12025237 microseconds. Ignoring time. adjust_timeouts2: packet supposedly had rtt of 12025237 microseconds. Ignoring time. adjust_timeouts2: packet supposedly had rtt of 9016887 microseconds. Ignoring time. adjust_timeouts2: packet supposedly had rtt of 9016887 microseconds. Ignoring time. adjust_timeouts2: packet supposedly had rtt of 9017027 microseconds. Ignoring time. adjust_timeouts2: packet supposedly had rtt of 9017027 microseconds. Ignoring time. RTTVAR has grown to over 2.3 seconds, decreasing to 2.0 RTTVAR has grown to over 2.3 seconds, decreasing to 2.0 > 교수 컴퓨터가 학생 컴퓨터로부터 노출되어지고 있음 내가 관리자라면 막아야 한다. ip+port(65536개 : 0 ~ 65535) 254*65535 =16,645,890
[AccessList 설정하기] - 라우터 콘솔에서 설정 라우터의 털넷 활성화 jjcom>_사용자모드 / jjcom#_ 관리자모드 처음에는 털넷이 활성화가 되어 있지 않음 config t enable secret 123456 config t line vty 0 4 password 123456 login exit config t ip domain-name st.kr crypto key generate rsa 2048 ip ssh version 2 line vty 0 4 transport input ssh show crypto key mypubkey rsa config t line con 0 exec-time 0 0 표준 ACL 과 확장 ACL 표준 ACL : 출발지 IP주소만 참조하여 패킷을 필터링 함 확장 ACL : 출발지 및 목적지 ip주소와 TCP,UDP,포트 번호를 참조하여 패킷을 필터링 함 [칼리에서 들어오는 공격을 막는 명령어] config t access-list 1 deny 192.168.0.2 0.0.0.0 access-list 1 permit any interface fastethernet0/0 ip access-group 1 in exit
칼리에서 telnet 192.168.0.254 입력 하면 Trying 192.168.0.254... telnet: Unable to connect to remote host: No route to host > 접속이 차단 되어버림
화요일은 라우팅할 예정.. 이제 3일차 끝... 63일 남았다... 얼른 가라 시간아...

2025 산대특