Notice
Recent Posts
Recent Comments
Link
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

개발자 되버리기

iptables 포트 리다이렉트 본문

Linux/Ubuntu

iptables 포트 리다이렉트

구본익 2019. 5. 17. 09:38

iptables --table nat --append PREROUTING --protocol tcp --dport 80 --jump REDIRECT --to-ports 8080

 

 

https 를 쓴다면

iptables --table nat --append PREROUTING --protocol tcp --dport 443 --jump REDIRECT --to-ports 8080

 

iptables 재시작 명령어

/etc/init.d/iptables restart

 

21번 포트를 열고 싶다.
#iptables -I INPUT 1 -p tcp --dport 21 -j ACCEPT 
#iptables -I OUTPUT 1 -p tcp --dport 21 -j ACCEPT 

Comments