What's new

Newb question - why is there nothing in /jffs/scripts?

  • 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!

user764

New Around Here
Have JFFS enabled, flash lastest firmware but I don't see any of the scripts referenced in the wiki showing up in the /jffs/scripts folder. Are they supposed to be put there upon upgrade or do I download them from somewhere?
 
You have to create them manually. Entware scripts are created automatically, if you choose to install entware of course. :)

Sent from my HTC One S
 
What I'm trying to accomplish is get selective routing to work, as I have openvpn running on the ASUS but I want to bypass one IP in particular, so I don't slow it down.

The setup is as such:

OpenVPN running on ASUS router (only get 10mbit)
Also have PIA client running on windows server that does most downloading, and with the client it saturates my connection at 50mbit.

What I want is to have my whole network protected by the VPN, but to have the one server be separate and let it run it's own client.

The other item I'd like is to have inbound requests work so I can host a web server.

I've read the posts on selective routing, and for some reason the below script doesn't work. It's possible I don't understand how to do this - but I Have JFFS setup and this script (without the .sh) is in that /jffs/scripts folder (and i've rebooted).

Any suggestions?


Code:
#!/bin/sh

touch /tmp/000wanstarted

for i in /proc/sys/net/ipv4/conf/*/rp_filter ; do
echo 0 > $i
done



#US VPN

#
# Delete and table 100 and flush any existing rules if they exist.
#
ip route flush table 100
ip route del default table 100
ip rule del fwmark 1 table 100
ip route flush cache
iptables -t mangle -F PREROUTING



#
# Copy all non-default and non-VPN related routes from the main table into table 100.
# Then configure table 100 to route all traffic out the WAN gateway and assign it mark "1"
#
# NOTE: Here I assume the OpenVPN tunnel is named "tun11".
#
#
#ip route show table main | grep -Ev ^default | grep -Ev tun11 \
# | while read ROUTE ; do
# ip route add table 100 $ROUTE
# done



ip route add default table 100 via $(nvram get wan_gateway)
ip rule add fwmark 1 table 100
ip route flush cache



#
# Define the routing policies for the traffic. The rules will be applied in the order that they
# are listed. In the end, packets with MARK set to "0" will pass through the VPN. If MARK is set
# to "1" it will bypass the VPN.
#



# All LAN traffic will bypass the VPN (Useful to put this rule first, so all traffic bypasses the VPN and you can # configure exceptions afterwards)

iptables -t mangle -A PREROUTING -i br0 -j MARK --set-mark 1


# All traffic from VOIP will use the WAN
iptables -t mangle -A PREROUTING -i br0 -m iprange --src-range 192.168.1.130 -j MARK --set-mark 1



exit 0
 

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