GGYU
Netwok - 재택근무 환경 구축 본문
nebula를 이용한 재택근무 환경 구축
- Generate certificates with subnet for 1 node in my office:
nebula-cert sign -name "office" -ip "192.168.100.100/24" -subnets "192.168.8.0/24"
- Enable unsafe route on my laptop:
unsafe_routes:
- route: 192.168.8.0/24 via: 192.168.100.100
- Make sure ip forward was enabled on "office", return "1" means enabled:
For Linux : sysctl -n net.ipv4.ip_forward
For Windows : Set-NetIPInterface -Forwarding Enabled
- Create NAT on "office"
# create NAT between 192.168.100.0/24 <---> 192.168.8.0/24
iptables -t nat -A POSTROUTING -s 192.168.100.0/24 -d 192.168.8.0/24 -j MASQUERADE
# accept all packets from 192.168.100.0/24 to 192.168.8.0/24
iptables -I FORWARD 1 -s 192.168.100.0/24 -d 192.168.8.0/24 -j ACCEPT
# accept all established network connections
iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
'I.F. > linux' 카테고리의 다른 글
운영 OS를 docker 파일로 만들기 (0) | 2021.04.02 |
---|---|
shell 파스텔톤으로 색상변경 (0) | 2017.11.06 |
centos7 nic 이름 변경 (0) | 2017.10.14 |
ubuntu 16.04 bonding balance-alb모드가 안될때 (0) | 2017.06.22 |
nginx mingw 32bit용 빌드시 주의사항 (0) | 2017.06.21 |
Comments