Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

iptables localhost redirection

sudo iptables -t nat -A PREROUTING -p tcp -m tcp -s 192.168.4.0/24 --dport 80 -j DNAT --to-destination 192.168.2.4

sudo iptables -t nat -A PREROUTING -p tcp -m tcp -s 192.168.4.0/24 --dport 443 -j DNAT --to-destination 192.168.2.4
Source by raspberrypi.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #iptables #localhost #redirection
ADD COMMENT
Topic
Name
6+2 =