From carrying out some brief research, it appears that as is the case today, when using Dial-Up to access the Internet customers were often allocated a dynamic IP address by their ISP. Typically, when connecting via a Broadband connection today via a router, some protection is offered from externally-facing attacks; the router only allows traffic to reach internally-connected clients if a rule has explicitly been defined to allow packets to be forwarded to a specific internal IP via a port number. Was this the case when using Dial-Up, or in theory was a machine accessible to anyone - either unless a user had installed and configured a software-based firewall on their computer, or the ISP implemented some kind of NAT?
In the UK my dial-up connection (from 1996) was accessible to anyone whilst connected. I didn't use a firewall on my MS-DOS computer. However, due to paying per-minute phone charges to dial in (in addition to a fixed monthly charge from my ISP), I only used the connection in batch mode for email and Usenet news (no Web) so I wasn't online for very long. (I would dial in and my Internet software would automatically transfer any email or news then logoff. I would read it offline and any replies would be sent on the next login.)
When I changed to a broadband connection (in 2006) with a cable modem and a MS-Windows PC I used a firewall (ZoneAlarm) which did detect external attacks. I added a router, to get wifi. The combination of NAT and an internal firewall in the router meant that ZoneAlarm no longer saw any attacks.
When connecting to the Internet via Dial-Up, were computers directly accessible via their allocated IP address?
For example, my first internet connection was via a small ISP that used static address allocation from public address space.
(This was mid-1990s; at that time "you can't attack a service that isn't running" seemed to be sufficient)
At least some dial-up connections were directly connected to the Internet. Back in the late '90s I would often SSH in to my modem-connected home computer. Given that the addresses were dynamically assigned I'm not sure how I knew the IP to connect to. I suspect I either noted the address before leaving home or had a cron job attempt a connection to my work computer hourly or somesuch; checking its logs would show my home IP. I don't recall any port blocking going on but NETBIOS (ports 137-9) probably were blocked, especially in later years.
This is one of those "it depends" answers. Source, I used to work as a network engineer, focusing primarily on "the internal backbone" and "dialup termination" at an ISP.
We would, by default, provide a publicly routable IP based on the POP you dialled into (assigned by the chassis your call terminated in).
We also had "single statically allocated IP" or "small statically allocated netblock" as an up-sell service (assigned by RADIUS as you authenticated).
Other ISPs would allocate a non-public IP, relying on proxies and NAT to provide internet connectivity.
As another example of how open things were "back in the day"...
In January 1996 I registered a domain and set up a Linux box on dial-up with my local ISP just outside the greater Chicago area. Not only did I have static IP, but because of the way they were set up I received a whole 30-IP block of public addresses! The Linux box ran SMTPD, NNTPD, IRCD, HTTPD, FTPD, Telnetd, etc. and also set up the PC as a router, so all three PCs in the house were publicly accessible on a 10base2 network. I was even giving accounts on the machine to friends for hosting their own web and FTP sites.
That lasted about 8 months before the ISP clawed back most of those but I still had 6 public IPs until I moved to a more rural area in late 1998, still in upstate Illinois. Even then I had a Static IP dialup with a couple of different providers, first with 2 public IPs and finally just one but I was still able to run all the daemons. I had NAT set up in my house so I could be at work and telnet to my home server or print to my home printer.
In 2003 I moved to upstate New York and moved to a cable modem with Earthlink. I stopped running NNTP but nothing was blocked. It wasn't until I moved to Delaware in 2012 and had experience with Comcast and FIOS that SMTP was blocked at the ISP level.