EdgeRouter how to use an exit node?

I have setup tailscale on my Edge Router ER-X, everything runs fine except when I tried to use an exit node on the router by running
sudo tailscale up --exit-node=xxx.xxx.xxx.xxx
The router got stuck and I cannot even ssh into my router.
My simple use case is that I want every device connected to this edge router to have its traffic routed through the exit node.
Can anyone please help? Thanks!