Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- iptables --flush
- iptables --table nat --flush
- iptables --delete-chain
- iptables --table nat --delete-chain
- iptables --table nat --append POSTROUTING --out-interface tun0 -j MASQUERADE
- iptables --append FORWARD --in-interface tun0 -j ACCEPT
- echo 1 > /proc/sys/net/ipv4/ip_forward
- iptables -t nat -A PREROUTING -p tcp -m tcp --dport 554 -j DNAT --to-destination 10.9.0.6
- iptables -t nat -A PREROUTING -p udp -m udp --dport 554 -j DNAT --to-destination 10.9.0.6
- iptables -t nat -A POSTROUTING -d 10.9.0.6 -p tcp -m tcp --dport 554 -j MASQUERADE
- iptables -t nat -A POSTROUTING -d 10.9.0.6 -p udp -m udp --dport 554 -j MASQUERADE
- iptables -I FORWARD -i tun0 -p udp -d 10.9.0.6 --dport 554 -j ACCEPT
- iptables -I FORWARD -i tun0 -p tcp -d 10.9.0.6 --dport 554 -j ACCEPT
- iptables -t nat -I PREROUTING -i tun0 -p tcp --dport 554 -j DNAT --to-destination 10.9.0.6
- iptables -t nat -I PREROUTING -i tun0 -p udp --dport 554 -j DNAT --to-destination 10.9.0.6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement