I walled in the entrance to my fortress, and solved the problem of a water-filled channel by walling right across it. The problem is, apparently people can just walk through that channel, as it's usually only filled 3/7 of water. What's the easiest way of blocking this one tile?
A screenshot or rendition of the specific layout might be helpful, but I'll give answering a try anyway.
There are essentially two options for closing the tunnel. If you can drain it completely, at least for a while, you can simply construct a wall, door or floodgate to seal it completely, or fortifications, a grate, vertical bars or a statue if you need to let water through.
A second, more involved option, but that doesn't require draining the tunnel first is applying magma to the opening, turning the whole thing into obsidian, but that won't let water through (although fortifications can be carved into it at a later point).
Edit: Another option is to floor over any access points to the tunnel, on either side.