Projet/Mission1/Syslog/redirectiongw5.sh

5 lines
250 B
Bash
Executable File

#!/bin/bash
echo "1" > /proc/sys/net/ipv4/ip_forward
sudo iptables -t nat -A PREROUTING -d 10.121.38.35 -p udp --dport 517 -j DNAT --to 192.168.0.22:514
sudo iptables -t nat -A POSTROUTING -d 192.168.0.22 -p udp --dport 517 -j SNAT --to 10.121.38.35