1. Enable IP Forwarding
- sysctl net.ipv4.ip_forward=1
2. Add Rule
- iptables -t nat -A PREROUTING -p tcp -d 192.168.23.1 --dport 5544 -j DNAT --to-destination 192.168.2.11:554
3. Ask IPtables to Masquerade
- iptables -t nat -A POSTROUTING ! -s 127.0.0.1 -j MASQUERADE
4. Check config
- iptables -t nat -L
5. Save config
- sudo iptables-save
6. Delete if needed
- sudo iptables -t nat -L --line-numbers
- iptables -t nat -D PREROUTING 1
0 komentar:
Posting Komentar