To think, consider $N$ connected boundaryless manifold. I believe that when $f$ is a proper map and also the restriction $f:\partial M\rightarrow N$ is a submersion, then (M,f,N) become a fiber bundle.

**Claim:**

Let $p:E\longrightarrow B$ a submersion such that $p$ is a proper map, $\partial B=0$. Then, $E$ is the total space of a fiber bundle over $B$ with projection $p$. When $\partial E\neq \emptyset $ this result is true if $p\vert_{\partial E}:\partial E\longrightarrow B$ is a submersion.

**Proof's Sketch:**

Fixe $x\in B$ and let $W$ be a tubular neighborhood of $ p^{-1}(x)$ in $E$ with smooth retraction $r:W\longrightarrow p^{-1}(x)$ (see Hirsch, Differential topology page 109. The hypothesis that $p\vert_{\partial E}$ is a submersion ensures that $p^{-1}(x)$ is a *neat* submanifold for each $x\in B$, hence there exists tubular neighborhood for $p^{-1}(x)$ for each $x\in B$). The differential of the map
$$
p\times r:W\longrightarrow B\times p^{-1}(x)
$$
is non singular in each point of $p^{-1}(x)\subset W$. Since $p^{-1}(x)$ is compact, we can obtain an open neighborhoord $W^{'}$ of $p^{-1}(x)$ such that $p\times r:W^{'}\longrightarrow B\times p^{-1}(x)$ is an embendding. As $p$ is a proper map, we can obtain an open set $U$ of $B$ such that $p^{-1}(x)\subset p^{-1}(U)$ and $p^{-1}(U)\subset W^{'}$. Thus,
$$
p\times r:p^{-1}(U)\longrightarrow B\times p^{-1}(x)
$$
is a diffeomorphisms satisfying $\pi_1\circ(r\times p)=p$. We conclude by showing that given $y\in B$, $p^{-1}(y)$ is diffeomorphic to $p^{-1}(x)$. First, the condition *$p^{-1}(y)$ is diffeomorphic to $ p^{-1}(x)$* is an open condition, since that for $y\in p^{-1}(U)$, the restriction $p\times r:p^{-1}(y)\longrightarrow \{y\}\times p^{-1}(x)$ is a difeomorphism. Now, given $y\in B$ such that there exists a sequence $y_n\longrightarrow y$ and $p^{-1}(y_n)$ which is diffeomorphic to $p^{-1}(x)$, then by the early construction, for sufficiently large $n$, $p^{-1}(y_n)$ is diffeomorphic to $p^{-1}(y)$, concluding that the condition *$p^{-1}(y)$ is diffeomorphic to $ p^{-1}(x)$* is a closed condition. Since that $B$ is a connected space, this proves the claim.

Ps. If $B$ is a disconnected manifold, we have that $p$ is locally trivial but the fibers can be different.