I am sitting with quite a predicament, I am the happy owner of a model B pi running a raspbian lampi distro. The pi is currently running a little php site which connects to a network of devices and servers running all sorts of apps, including ubuntu machines and mysql databases, this network LAN (Network 1) does have internet access but only via proxy and i cant use it. the pi is also connected to WiFi network which will be used to send out mails via phpmailer and will be used for incoming connections to the pi for users that will use the php site.
Here is a breakdown of the networks Network 1 - LAN 24 Ubuntu Machines running all sorts of scripts 4 Mysql Databases
Network 2 - WiFi Incoming Connections to the pi (Port Forwarding on the router) Purely and internet connection will be used to send mail via php mailer
Now here is my problem, when connected to these two networks i cannot seem to access the internet over the wifi as the lan connection takes over (frustrating)
Is it possible to set Network 1 to only run services such as SSH, Mysql etc ports 22, 3306, 3307 and have Network 2 run Http and smtp ports?
How would i go about doing that. To be honest networking on linux distros is french to me and i have no idea what i am doing. Help would be greatly appreciated.
Please note that i am very new to this type of networking, i have heard people say i must use iproute or iptables but to be honest i have no idea what i am doing there?