Strangely enough the html modem configuration set up window says that my ip is 192.168.1.1 but then in System preferences/network it says that my ip is 192.168.1.2 and that my router is 192.168.1.1
That is not strange, the html page is not your ip but the router's ip.. The modem is 192.168.1.1 and your computer is 192.168.1.2
it's never solid except when I uplugged the filter and plugged the RJ-11 port directly into the wall jack.
That sounds like a dodgy filter. I would replace that with a known good filter.
Although, even after doing that the internet still won't work.
D-link modem's can be buggy and don't work very well with Safari have you tried configuring it with Internet Explorer.
But putting that aside I would not use a dlink-300g anyway unless I was using it in conjunction with a router. It is just a modem and does not have a combined router.
If you purchased an ADSL router(that is an adsl modem/router combined) you would have the added benifit of firewall security and the ability to network with other computers in the future.
If you purchased a combined adsl modem/router/wireless access point you would be able to have wireless internet.