It is legal to trade in forex with Indian Exchanges like NSE, BSE, MCX-SX where they currently offer 4 pairs (USDINR, JPYINR, GBPINR, EURINR) in Derivatives (Futures and Options Segment). So if you are trading with Indian Brokers whom have membership with the above mentioned Indian Exchanges it is perfectly legal as i took forex recommendations from MMF Solutions.
Also it is perfectly legal for Indian Retail traders to invest in overseas equity markets. But margin trading in overseas is suppose to be illegal as per RBI regulation guidelines.