From 4827904c7ab87fc50fbd411d88395ae1f60b298e Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 16 Jun 2018 22:13:21 +0200 Subject: [PATCH 1/1] prettify iptables rules --- ralf/_posts/2018-05-28-cloudless-contact-sync.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ralf/_posts/2018-05-28-cloudless-contact-sync.md b/ralf/_posts/2018-05-28-cloudless-contact-sync.md index 9b3e190..baced47 100644 --- a/ralf/_posts/2018-05-28-cloudless-contact-sync.md +++ b/ralf/_posts/2018-05-28-cloudless-contact-sync.md @@ -50,10 +50,10 @@ table nat { ``` The plain iptables equivalent is ``` --A PREROUTING -d $IP/32 -p tcp -m tcp --dport 80 -j DNAT --to-destination $IP:8053 --A PREROUTING -d $IP/32 -p tcp -m tcp --dport 443 -j DNAT --to-destination $IP:44353 --A OUTPUT -d $IP/32 -p tcp -m tcp --dport 80 -j DNAT --to-destination $IP:8053 --A OUTPUT -d $IP/32 -p tcp -m tcp --dport 443 -j DNAT --to-destination $IP:44353 +-A PREROUTING -d $IP -p tcp -m tcp --dport 80 -j DNAT --to-destination $IP:8053 +-A PREROUTING -d $IP -p tcp -m tcp --dport 443 -j DNAT --to-destination $IP:44353 +-A OUTPUT -d $IP -p tcp -m tcp --dport 80 -j DNAT --to-destination $IP:8053 +-A OUTPUT -d $IP -p tcp -m tcp --dport 443 -j DNAT --to-destination $IP:44353 ``` Next, we have to configure the SSH daemon to permit reverse port forwarding to be configured by the client. -- 2.30.2