What's new
  • 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!

iptables script by NAT-START not effective after WAN changed?

Lecan

New Around Here
When WAN changed like WAN was restored ,my iptables-set script trigger by nat-start, but not effective, It appears that some WAN events were triggered and clear the iptables after my script run.

Code:
May 14 18:49:15 pppd[25845]: Plugin rp-pppoe.so loaded.
May 14 18:49:15 pppd[25845]: RP-PPPoE plugin version 3.11 compiled against pppd 2.4.7
May 14 18:49:15 pppd[25857]: pppd 2.4.7 started by lijeep, uid 0
May 14 18:49:15 pppd[25857]: PPP session is 17237 (0x4355)
May 14 18:49:15 pppd[25857]: Connected to cc:1a:fa:ed:14:00 via interface eth1
May 14 18:49:15 kernel: Assigning idx[40] for ppp0
May 14 18:49:15 pppd[25857]: Using interface ppp0
May 14 18:49:15 pppd[25857]: Connect: ppp0 <--> eth1
May 14 18:49:15 pppd[25857]: Remote message: Authentication Successful,Welcome!
May 14 18:49:15 pppd[25857]: PAP authentication succeeded
May 14 18:49:15 pppd[25857]: peer from calling number CC:1A:FA:ED:14:00 authorized
May 14 18:49:15 lldpd[3764]: removal request for address of ***%40, but no knowledge of it
May 14 18:49:15 pppd[25857]: local  IP address ***
May 14 18:49:15 pppd[25857]: remote IP address ***
May 14 18:49:15 pppd[25857]: primary   DNS address ***
May 14 18:49:15 pppd[25857]: secondary DNS address ***
May 14 18:49:15 lldpd[3764]: removal request for address of ***%40, but no knowledge of it
May 14 18:49:15 lldpd[3764]: removal request for address of ***%40, but no knowledge of it
May 14 18:49:15 lldpd[3764]: removal request for address of ***%40, but no knowledge of it
May 14 18:49:15 custom_script: Running /jffs/scripts/nat-start
May 14 18:49:15 me: xray proxy is running after 0s
May 14 18:49:15 me: set ip-list success
May 14 18:49:15 me: ip rule already exist
May 14 18:49:15 me: set ip route success
May 14 18:49:15 me: set iptables success
May 14 18:49:16 dnsmasq[25428]: read /etc/hosts - 22 names
May 14 18:49:16 dnsmasq[25428]: using nameserver ***#53
May 14 18:49:16 dnsmasq[25428]: using nameserver ***#53
May 14 18:49:16 dnsmasq[25428]: using nameserver ***#53
May 14 18:49:16 dnsmasq[25428]: using nameserver ***#53
May 14 18:49:16 dnsmasq[25428]: read /etc/hosts - 22 names
May 14 18:49:16 dnsmasq[25428]: using nameserver ***#53
May 14 18:49:16 dnsmasq[25428]: using nameserver ***#53
May 14 18:49:16 dnsmasq[25428]: using nameserver ***#53
May 14 18:49:16 dnsmasq[25428]: using nameserver ***#53
May 14 18:49:16 wan: finish adding multi routes
May 14 18:49:16 openvpn-routing: Applying all killswitches
May 14 18:49:16 miniupnpd[25421]: shutting down MiniUPnPd
May 14 18:49:21 miniupnpd[26225]: HTTP listening on port 33063
May 14 18:49:21 miniupnpd[26225]: no HTTP IPv6 address, disabling IPv6
May 14 18:49:21 miniupnpd[26225]: Listening for NAT-PMP/PCP traffic on port 5351
May 14 18:49:21 rc_service: ip-up 25866:notify_rc stop_samba
May 14 18:49:21 wsdd2[25448]: terminating.
May 14 18:49:21 Samba_Server: smb daemon is stopped
May 14 18:49:22 rc_service: ip-up 25866:notify_rc start_samba
May 14 18:49:22 dnsmasq[25428]: exiting on receipt of SIGTERM
May 14 18:49:22 custom_config: Appending content of /jffs/configs/dnsmasq.conf.add.
May 14 18:49:22 dnsmasq[26238]: started, version 2.90 cachesize 1500
May 14 18:49:22 dnsmasq[26238]: asynchronous logging enabled, queue limit is 5 messages
May 14 18:49:22 dnsmasq-dhcp[26238]: DHCP, IP range 192.168.50.2 -- 192.168.50.254, lease time 1d
May 14 18:49:22 dnsmasq[26238]: read /etc/hosts - 22 names
May 14 18:49:22 dnsmasq[26238]: using nameserver ***#53
May 14 18:49:22 dnsmasq[26238]: using nameserver ***#53
May 14 18:49:22 dnsmasq[26238]: using nameserver ***#53
May 14 18:49:22 dnsmasq[26238]: using nameserver ***#53
May 14 18:49:22 Samba_Server: daemon is started
May 14 18:49:22 wsdd2[26258]: starting.
May 14 18:49:23 wan_up: Restart DDNS
 
Keep in mind that nat-start mostly targets the NAT/mangle tables, while firewall-start will target the filter table.
 
Keep in mind that nat-start mostly targets the NAT/mangle tables, while firewall-start will target the filter table.
yes, my script is set the mangle table only, and it works fine with router start or reboot, only broken when WAN changed.
 

Similar threads

Latest 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!
Back
Top