Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
tcconfig — tc 명령어 래퍼입니다. 네트워크 인터페이스/도커 컨테이너(veth)에 대한 네트워크 대역폭, 지연 시간, 패킷 손실, 패킷 손상 등의 트래픽 제어를 쉽게 설정할 수 있습니다. | Kitploit
도구/GitHubGitHub/thombashi/tcconfig
General Purpose UtilitiesNetwork SecurityChaos Engineering
GitHubthombashi/tcconfig

tcconfig

tc 명령어 래퍼입니다. 네트워크 인터페이스/도커 컨테이너(veth)에 대한 네트워크 대역폭, 지연 시간, 패킷 손실, 패킷 손상 등의 트래픽 제어를 쉽게 설정할 수 있습니다.

저장소 보기웹사이트
853904개월 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

.. contents:: tcconfig :backlinks: top :depth: 2

요약

tcconfig <https://github.com/thombashi/tcconfig>__ 는 tc 명령어의 래퍼입니다. 네트워크 인터페이스/Docker 컨테이너(veth)에 대한 네트워크 대역폭/지연/패킷 손실/패킷 손상 등의 트래픽 제어를 쉽게 설정할 수 있습니다.

|PyPI pkg ver| |Supported Python ver| |CI status| |CodeQL|

.. |PyPI pkg ver| image:: https://badge.fury.io/py/tcconfig.svg :target: https://badge.fury.io/py/tcconfig :alt: PyPI 패키지 버전

.. |Supported Python ver| image:: https://img.shields.io/pypi/pyversions/tcconfig.svg :target: https://pypi.org/project/tcconfig :alt: 지원되는 Python 버전

.. |CI status| image:: https://github.com/thombashi/tcconfig/actions/workflows/ci.yml/badge.svg :target: https://github.com/thombashi/tcconfig/actions/workflows/ci.yml :alt: 테스트 CI 상태

.. |CodeQL| image:: https://github.com/thombashi/tcconfig/actions/workflows/build_and_release.yml/badge.svg :target: https://github.com/thombashi/tcconfig/actions/workflows/build_and_release.yml :alt: 빌드 CI 상태

트래픽 제어

트래픽 셰이핑 규칙 설정 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 특정 네트워크에 트래픽 셰이핑 규칙을 쉽게 적용할 수 있습니다:

  • 발신/수신 패킷
  • 출발지/목적지 IP 주소/네트워크 (IPv4/IPv6)
  • 출발지/목적지 포트

사용 가능한 매개변수 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 네트워크 인터페이스에 다음 매개변수를 설정할 수 있습니다:

  • 네트워크 대역폭 속도 [G/M/K bps]
  • 네트워크 지연 시간 [마이크로초/밀리초/초/분]
  • 패킷 손실률 [%]
  • 패킷 손상률 [%]
  • 패킷 중복률 [%]
  • 패킷 재정렬률 [%]
  • 패킷 제한 개수 [COUNT]

대상 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  • 네트워크 인터페이스: 예: eth0
  • Docker 컨테이너 (컨테이너에 해당하는 veth)

.. image:: docs/gif/tcset_example.gif

사용법

트래픽 제어 설정 (tcset 명령어)

tcset 은 네트워크 인터페이스(장치)에 트래픽 제어 규칙을 추가하는 명령어입니다.

예: 대역폭을 최대 100Kbps로 제한 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: console

root@kitploit:~
# tcset eth0 --rate 100Kbps

예: 네트워크 지연 설정 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 지연 시간을 지정하려면 시간 단위(예: us/sec/min 등)를 사용할 수 있습니다.

네트워크 지연 100밀리초 설정 ''''''''''''''''''''''''''''''''''''''''''''''''''' .. code-block:: console

root@kitploit:~
# tcset eth0 --delay 100ms

네트워크 지연 10초 설정 ''''''''''''''''''''''''''''''''''''''''''''''''''' .. code-block:: console

root@kitploit:~
# tcset eth0 --delay 10sec

네트워크 지연 0.5분(30초) 설정 ''''''''''''''''''''''''''''''''''''''''''''''''''' .. code-block:: console

root@kitploit:~
# tcset eth0 --delay 0.5min

다음과 같은 시간 단위도 사용할 수 있습니다:

.. table::

root@kitploit:~
+------------+----------------------------------------------------------+
|    단위    |                사용 가능한 지정자 (문자열)               |
+============+==========================================================+
|시간        |``h``/``hour``/``hours``                                  |
+------------+----------------------------------------------------------+
|분          |``m``/``min``/``mins``/``minute``/``minutes``             |
+------------+----------------------------------------------------------+
|초          |``s``/``sec``/``secs``/``second``/``seconds``             |
+------------+----------------------------------------------------------+
|밀리초      |``ms``/``msec``/``msecs``/``millisecond``/``milliseconds``|
+------------+----------------------------------------------------------+
|마이크로초  |``us``/``usec``/``usecs``/``microsecond``/``microseconds``|
+------------+----------------------------------------------------------+

예: 0.1% 패킷 손실 설정 ^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: console

root@kitploit:~
# tcset eth0 --loss 0.1%

예: 위의 모든 설정을 한 번에 적용 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: console

root@kitploit:~
# tcset eth0 --rate 100Kbps --delay 100ms --loss 0.1%

예: 트래픽 제어 IP 주소 지정 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: console

root@kitploit:~
# tcset eth0 --delay 100ms --network 192.168.0.10

예: 트래픽 제어의 IP 네트워크 및 포트 지정 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: console

root@kitploit:~
# tcset eth0 --delay 100ms --network 192.168.0.0/24 --port 80

Docker 컨테이너에 트래픽 제어 설정 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Docker 호스트에서 --docker 옵션과 함께 tcconfig 를 실행하세요:

.. code-block:: console

root@kitploit:~
# tcset <컨테이너 이름 또는 ID> --docker ...

--src-container/--dst-container 옵션을 사용하여 발신/수신 컨테이너를 지정할 수 있습니다.

Docker 컨테이너 내부에서 트래픽 제어 설정 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 컨테이너 내부에서 tc 규칙을 설정하려면 --cap-add NET_ADMIN 옵션을 사용하여 컨테이너를 실행해야 합니다:

.. code-block:: console

root@kitploit:~
docker run -d --cap-add NET_ADMIN -t <도커 이미지>

tcconfig가 내장된 컨테이너 이미지는 https://hub.docker.com/r/thombashi/tcconfig/ 에서 사용할 수 있습니다.

트래픽 제어 삭제 (tcdel 명령어)

tcdel 은 네트워크 인터페이스(장치)에서 트래픽 셰이핑 규칙을 삭제하는 명령어입니다.

예: eth0 의 트래픽 제어 삭제 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -a/--all 옵션을 사용하여 eth0 의 모든 셰이핑 규칙을 삭제할 수 있습니다:

.. code-block:: console

root@kitploit:~
# tcdel eth0 --all

트래픽 제어 설정 표시 (tcshow 명령어)

tcshow 는 네트워크 인터페이스의 현재 트래픽 제어 설정을 표시하는 명령어입니다.

예 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block:: console

root@kitploit:~
# tcset eth0 --delay 10ms --delay-distro 2  --loss 0.01% --rate 0.25Mbps --network 192.168.0.10 --port 8080
# tcset eth0 --delay 1ms --loss 0.02% --rate 500Kbps --direction incoming
# tcshow eth0
{
    "eth0": {
        "outgoing": {
            "dst-network=192.168.0.10/32, dst-port=8080, protocol=ip": {
                "filter_id": "800::800",
                "delay": "10.0ms",
                "delay-distro": "2.0ms",
                "loss": "0.01%",
                "rate": "250Kbps"
            }
        },
        "incoming": {
            "protocol=ip": {
                "filter_id": "800::800",
                "delay": "1.0ms",
                "loss": "0.02%",
                "rate": "500Kbps"
            }
        }
    }
}

더 많은 정보

더 많은 예제는 다음에서 확인할 수 있습니다: https://tcconfig.rtfd.io/en/latest/pages/usage/index.html

설치

설치: pip

tcconfig 는 PyPI <https://pypi.python.org/pypi>__ 에서 pip <https://pip.pypa.io/en/stable/installing/>__ (Python 패키지 관리자) 명령어로 설치할 수 있습니다.

.. code:: console

root@kitploit:~
sudo pip install tcconfig

설치: dpkg (Debian/Ubuntu)

.. code:: console

root@kitploit:~
curl -sSL https://raw.githubusercontent.com/thombashi/tcconfig/master/scripts/installer.sh | sudo bash

의존성

  • Python 3.9+
  • Python 패키지 의존성 (자동 설치됨) <https://github.com/thombashi/tcconfig/network/dependencies>__

Linux 패키지

  • 필수: tc 명령어에 필요:
    • Ubuntu/Debian: iproute2
    • Fedora/RHEL: iproute-tc
  • 선택 사항: --iptables 옵션을 사용할 때 필요:
    • iptables

Linux 커널 모듈

  • sch_netem

선택적 Python 패키지

  • Pygments <http://pygments.org/>__

문서

https://tcconfig.rtfd.io/

문제 해결

https://tcconfig.rtfd.io/en/latest/pages/troubleshooting.html

Docker 이미지

https://hub.docker.com/r/thombashi/tcconfig/

후원자

|chasbecker| |shiguredo| |b4tman| |Arturi0| |github|

.. |chasbecker| image:: https://avatars.githubusercontent.com/u/44389260?s=48&u=6da7176e51ae2654bcfd22564772ef8a3bb22318&v=4 :target: https://github.com/chasbecker :alt: 전 후원자: Charles Becker (chasbecker) .. |shiguredo| image:: https://avatars.githubusercontent.com/u/2549434?s=48&v=4 :target: https://github.com/shiguredo :alt: 전 후원자: 時雨堂 (shiguredo) .. |b4tman| image:: https://avatars.githubusercontent.com/u/3658062?s=48&v=4 :target: https://github.com/b4tman :alt: 일회성: Dmitry Belyaev (b4tman) .. |Arturi0| image:: https://avatars.githubusercontent.com/u/46711571?s=48&u=57687c0e02d5d6e8eeaf9177f7b7af4c9f275eb5&v=4 :target: https://github.com/Arturi0 :alt: 일회성: Arturi0 .. |github| image:: https://avatars.githubusercontent.com/u/9919?s=48&v=4 :target: https://github.com/github :alt: 일회성: GitHub (github)

후원자가 되기 <https://github.com/sponsors/thombashi>__

도구 다운로드