Xentrk
Part of the Furniture
I went back to the posts and placed the hyper link to the Version 2.0.0 Update Process instructions in the introduction text at the top of the post. Hopefully it will help those who arrive in the future.No. I looked for that procedure but could not find it in either the 1st post of this thread or on the github text, so I thought I'd figure it out myself. After a few stumbles, including not getting the Policy Rules to work, I rebooted, and now all is OK. One issue I still have is that the nat-start file contains the new rules, but after the reboot, x3mRouting did not pick up all the rules. When I manually executed them from the ssh session, I ended up with duplicate lines of the same rules in nat-start. But I'm not sure x3m will pick up on them the next time I do a reboot. BTW, I initially did an uninstall then an install from amtm. That sequence did not produce a conversion file.
The old version of x3mRouting has to be installed for the conversion to work. Do you have a backup of /jffs partition to restore from? Then, you an redo the update and conversion.
I had a similar issue you describe with some rules not getting created. This started happening after I updated to 384.19 test build. It ended up being a USB 2.0 issue. I moved my USB to the 3.0 port and the problem went away. Too many things were trying to i/o the USB at boot and wasn't able to keep up. For awhile, disabling the disk check utility in amtm made the issue go away. But not consistently. I also saw one duplicate rule get created for an IPSET list when I was debugging the issue. I haven't had an issue since moving the USB to the 3.0 port.
Not sure why you have a duplicate entry in nat-start. Here is how x3mRouting works. When you execute x3mRouting from the command line, it will do all of the configuration. It will place the appropriate line in nat-start and the openvpn-route-up and openvpn-route-pre-down files. The entry in nat-start will include the full path name. Example:
nat-start example 1
Code:
#!/bin/sh
sh /jffs/scripts/x3mRouting/x3mRouting.sh server=1 client=1
sh /jffs/scripts/x3mRouting/x3mRouting.sh ipset_name=NF asnum=AS2906
sh /jffs/scripts/x3mRouting/x3mRouting.sh ALL 1 NETFLIX-DNS dnsmasq=netflix.com,nflxext.com,nflximg.com,nflximg.net,nflxso.net,nflxvideo.net,amazonaws.com
sh /jffs/scripts/x3mRouting/x3mRouting.sh ALL 1 NETFLIX_AS2906 asnum=AS2906
openvpn-route-up example (the -D prevents duplicate rules)
Code:
#!/bin/sh
iptables -t nat -D POSTROUTING -s "$(nvram get vpn_server1_sn)"/24 -o tun11 -j MASQUERADE 2>/dev/null
iptables -t nat -A POSTROUTING -s "$(nvram get vpn_server1_sn)"/24 -o tun11 -j MASQUERADE
iptables -t mangle -D PREROUTING -i br0 -m set --match-set NETFLIX-DNS dst -j MARK --set-mark 0x1000/0x1000 2>/dev/null
iptables -t mangle -A PREROUTING -i br0 -m set --match-set NETFLIX-DNS dst -j MARK --set-mark 0x1000/0x1000
iptables -t mangle -D PREROUTING -i br0 -m set --match-set NETFLIX_AS2906 dst -j MARK --set-mark 0x1000/0x1000 2>/dev/null
iptables -t mangle -A PREROUTING -i br0 -m set --match-set NETFLIX_AS2906 dst -j MARK --set-mark 0x1000/0x1000
openvpn-route-pre-down example
Code:
#!/bin/sh
iptables -t nat -D POSTROUTING -s "$(nvram get vpn_server1_sn)"/24 -o tun11 -j MASQUERADE 2>/dev/null
iptables -t mangle -D PREROUTING -i br0 -m set --match-set NETFLIX-DNS dst -j MARK --set-mark 0x1000/0x1000 2>/dev/null
iptables -t mangle -D PREROUTING -i br0 -m set --match-set NETFLIX_AS2906 dst -j MARK --set-mark 0x1000/0x1000 2>/dev/null
Every time x3mRouting runs, it checks if the required entries are in the nat-start and openvpn event files. If it doesn't find the entries, it adds the line. If the line is manually added like in the nat-start example 2 below, x3mRouting code will add the nat-start entry as shown in example 3 since there is no match in nat-start with the path.
nat-start example 2
Code:
#!/bin/sh/
cd /jffs/scripts/x3mRouting
sh x3mRouting.sh ALL 1 MYLIST dnsmasq=domain1,domain2
nat-start example 3
Code:
#!/bin/sh/
cd /jffs/scripts/x3mRouting
sh x3mRouting.sh ALL 1 MYLIST dnsmasq=domain1,domain2
sh /jffs/scripts/x3mRouting/x3mRouting.sh ALL 1 MYLIST dnsmasq=domain1,domain2
Edit: If you still have a copy of old nat-start file, See http://www.snbforums.com/threads/x3...for-asuswrt-merlin-firmware.57793/post-603809
Last edited: