What's new

VPN Port forwarding in nat-start script

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

killeriq

Regular Contributor
Hello,

I just moved to 384.7b1 , before i was on 380.7 and was using this NAT-START script to forward ports on specific IPs on VPN


NAT-START
Code:
#!/bin/sh

# always make it EXECUTABLE X !!!

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

# DC++
iptables -I FORWARD -i tun11 -p tcp -d 192.168.10.80 -m multiport --dports 2351,2352 -j ACCEPT
iptables -I FORWARD -i tun11 -p udp -d 192.168.10.80 -m multiport --dports 2351,2352 -j ACCEPT

# DC++
iptables -t nat -I PREROUTING -i tun11 -p tcp -m multiport --dports 2351,2352 -j DNAT --to-destination 192.168.10.8
iptables -t nat -I PREROUTING -i tun11 -p udp -m multiport --dports 2351,2352 -j DNAT --to-destination 192.168.10.8

This way was working on 380.7 fine, but on 384.7b1 is working on IPs on VPN , but is blocking internet traffic on all nonVPN IPs , i assume something might changed in the "iptables" part but no clue what :(

Soon as i change it to "non executable" VPN is not forwarding ports but keeps selected IP on VPN and also nonVPN IPs are working (able to connect to internet)

Any suggestion? thanks
 
Also realized even im able to connect (with nat-start disabled) with non VPN IPs to internet , my RiG wasnst able to connect here : stratum+tcp://xvg-x17.suprnova.cc:7477

So i would say the way how to do Forwarding and VPN setting has changed in New builds (382+)

I a mean time i had to rollback to 380.7 as here is working fine, will need to stay on this build till someone is able to suggest how to fix.

thanks
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top