Hi.
I'm trying to set up port forwarding between network interfaces tun11 and br0. I have a problem with this theme for a few days, and somehow I do not go. my network diagram below:
10.0.0.1 br0
eth0 internet address
tun11 10.8.0.6 (openvpn client address)
Because of that, my main ISP assigns a dynamic public IP me, I used the vps with constant public on which I have placed openvpn server. I used VPS server as a relay with a fixed public IP on which I have set up port forwarding.
vps public ip 80 10.8.0.6 80
vps public ip 25 10.8.0.6 25
vps public ip 8080 10.8.0.6 8080
Redirect to ports 80 and 25 is working properly, but I have a problem with NAT, because I need to redirect the address 10.0.0.13 on port 8080 on which I have connected the camera ip
I would also like to forward packets coming from 10.0.0.1 br0 interface on port 25 on tun11 10.8.0.6 (mail server)
I tried according to the tutorial but somehow it does not work:
https://airvpn.org/topic/11264-asus-merlin-wrt-port-forwarding-script-setup/
jffs/scripts/nat-start
#!/bin/sh
iptables -I FORWARD -i br0 -o tun11 -j ACCEPT
iptables -I FORWARD -i tun11 -o br0 -j ACCEPT
iptables -I FORWARD -i br0 -o vlan1 -j DROP
iptables -I INPUT -i tun11 -j REJECT
iptables -t nat -A POSTROUTING -o tun11 -j MASQUERADE
iptables -I FORWARD -i tun11 -p tcp -d 10.0.0.13 --dport 8080 -j ACCEPT
iptables -t nat -I PREROUTING -i tun11 -p tcp --dport 8080 -j DNAT --to-destination 10.0.0.13:8080
Please help.
I'm trying to set up port forwarding between network interfaces tun11 and br0. I have a problem with this theme for a few days, and somehow I do not go. my network diagram below:
10.0.0.1 br0
eth0 internet address
tun11 10.8.0.6 (openvpn client address)
Because of that, my main ISP assigns a dynamic public IP me, I used the vps with constant public on which I have placed openvpn server. I used VPS server as a relay with a fixed public IP on which I have set up port forwarding.
vps public ip 80 10.8.0.6 80
vps public ip 25 10.8.0.6 25
vps public ip 8080 10.8.0.6 8080
Redirect to ports 80 and 25 is working properly, but I have a problem with NAT, because I need to redirect the address 10.0.0.13 on port 8080 on which I have connected the camera ip
I would also like to forward packets coming from 10.0.0.1 br0 interface on port 25 on tun11 10.8.0.6 (mail server)
I tried according to the tutorial but somehow it does not work:
https://airvpn.org/topic/11264-asus-merlin-wrt-port-forwarding-script-setup/
jffs/scripts/nat-start
#!/bin/sh
iptables -I FORWARD -i br0 -o tun11 -j ACCEPT
iptables -I FORWARD -i tun11 -o br0 -j ACCEPT
iptables -I FORWARD -i br0 -o vlan1 -j DROP
iptables -I INPUT -i tun11 -j REJECT
iptables -t nat -A POSTROUTING -o tun11 -j MASQUERADE
iptables -I FORWARD -i tun11 -p tcp -d 10.0.0.13 --dport 8080 -j ACCEPT
iptables -t nat -I PREROUTING -i tun11 -p tcp --dport 8080 -j DNAT --to-destination 10.0.0.13:8080
Please help.