summaryrefslogtreecommitdiffstats
path: root/rules/11-pht-forwards
blob: d4b723fc79205dd4967a5afcdb8b34041ec69fad (plain)
1
2
3
4
5
6
7
8
9
#!/bin/bash
rules() {
    if ${HAVE_WAN2}; then
        iptables -t nat $flag PREROUTING -i ${IF_WAN} -d ${HOST_KASHA_WAN2} -p tcp --dport 666 -j DNAT --to-destination 10.24.40.1:22
        iptables -t nat $flag POSTROUTING -o ${IF_WAN} -d 178.217.184.63 -j SNAT --to-source ${HOST_KASHA_WAN2}
    fi
    iptables -t nat $flag PREROUTING -i ${IF_WAN} -d ${HOST_KASHA_WAN} -p tcp --dport 666 -j DNAT --to-destination 10.24.40.1:22
    iptables -t nat $flag PREROUTING -i ${IF_WAN} -d ${HOST_KASHA_WAN} -p tcp --dport 777 -j DNAT --to-destination 10.24.40.1:80
}