Usually when you get 404 from external environment following can be the issues:-
1) Public DNS entries for following URLs:-
· ADFS service name : e.g sts.namma.com
· CRM website’s external URL : https://org.namma.com i.e. mycrm.namma.com as org name is mycrm.
· CRM discovery URL : https://dev.namma.com
· CRM IFD URL : https://auth.namma.com i.e. CRM IFD Federation endpoint
Make sure these are A(Hostnames) records in DNS or at least ADFs URL and external CRM URL.
2) Secondly, Firewall. Can you please give the details of the firewall that you have. Is it TMG ?
3)
Can you please browse following ADFS URL externally :-
https://<sts.domain.com>/adfs/ls/idpinitiatedsignon.aspx