ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [Ubuntu] 우분투 인터넷 독립망 구성하기
    Linux/Ubuntu 2021. 12. 3. 11:43

    굳이 가상머신이 아니더라도 순수 ubuntu 여도 비슷할 것 같다.

    로컬 PC에 WSL를 켜놓고  로컬 PC는 인터넷을 이용하면서 WSL은 인터넷을 끊고 싶은 상황이 생겼다.

     

    방법은 간단하다 WSL에 있는 랜카드를 제거하면된다 

    ifconfig -> 랜카드 정보 확인 

    ifconfig
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 172.18.110.167  netmask 255.255.240.0  broadcast 172.18.111.255
            inet6 fe80::215:5dff:feb2:97ed  prefixlen 64  scopeid 0x20<link>
            ether 00:15:5d:b2:97:ed  txqueuelen 1000  (Ethernet)
            RX packets 8718  bytes 2033749 (2.0 MB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 186  bytes 13762 (13.7 KB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    sudo ifconfig eth0 down  -> eth0 랜카드 재실행 

    ifconfig
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

     

    댓글

Designed by Tistory.