Hello,
After using the above command dont forget to save the rules. Otherwise this will not work.
service iptables save
or
/etc/init.d/iptables save
Hope this information was helpful.
Main Topics
Browse All TopicsHi,
Having little knowledge in Linux I wonder if someone is able to help?
I have an application that is running within Linux that is in our DMZ area, I really need to be able to access this from our internal network, what commands would I issue to Linux to allow this.
As example lets say the servers IP is 192.168.11.189
The network I am trying to access it from is 192.168.20.1 through to 192.168.20.254
The port in question is: 3306 (MySQL)
Regards,
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Thanks to both of you for the info.
I have managed to run 'mwecomputers' function and it has been accepted by the system, or at least it didn't error.
I had to use SUDO in the front and then enter the password.
However I still can't connect using MySQL Front, the application that I was trying to get to work on the internal network.
I then saw the comment from 'testez' but this function my system doesn't like.
The upper command returns 'unrecognized service', the lower one
'No such file or directory'.
I can see what you are saying about saving the file, does anyone know where the file or service might be?
Thanks so far to you both.
There might be another possibility that your 192.168.20.x subnet cannot reach the 192.168.11.x subnet due to a VLAN restriction via a switch or hardware firewall.
Describe how your network infrastructure is setup (i.e. firewalls and managed switches used, number of subnets and their IPs, VLAN configuration, etc). Also describe what connectivity you currently have from the 192.168.20.x network over to the 192.168.11.x network.
Hi,
thank you again for posting.
I have ran the command and have the following;
srvad@Srv-PresP:
/sbin/iptables
/sbi
/s
/us
/usr/li
/
/usr
/usr/sbin/
/usr/sha
/usr/
/usr/sha
/usr/
/usr/shar
/usr/s
/usr/sha
/us
/usr/sh
/
/usr/s
/
/usr/s
/
/usr/s
/
/usr/s
/
/usr/sha
/usr/share
/
/u
/usr
/usr/s
/usr/sha
/usr/share
/u
/usr
/usr/s
/usr/sha
/u
/us
/u
/usr
/usr/sh
/usr
/usr/shar
/usr/s
/usr
/
/var/lib/
/var
/var/lib
/va
srvad@Srv-
/sbin/iptable
/usr
srvad@
Could you advise which I should use to save the command?
Thanks again for your help.
Since there are load-balanced firewalls involved, you might need to put additional iptables rules in to allow connectivity from those IP addresses as well (i.e. you might be coming from 192.168.20.2, but on the Linux server you might be showing up as 192.168.30.1) or something else the firewall is using for 1-to-1 NAT translation.
The best way to check would be to open a command console on the Windows PC, then try something like:
'telnet dmz-server-name 3306'
This way you can make sure that connectivity is actually getting there.
If you know of another 'open' port on the Linux server already (and are able to access currently), try using the same telnet command from your Windows PC to the open port on the Linux server and on the Linux server run 'netstat -na | grep -i ESTABLISHED' to see if what IP address is being used to access the server from the Windows PC side.
OK thank you for all the information.
mwecomputers I have tried as you suggest, I can connect with telnet on port 5900, which is the remote desktop. Running the netstat command I can see my IP address in the entry on the port.
However I still cannot get the MySQL program 'MySQL Front' on my Windows PC to communicate with the Linux MySQL app.
Very strange, I believe like you it is a port issue. I will dig out the manual and check that other ports don't require opening.
Thank you 'testez' for the port opening command, that has worked and was confirmed by Linux.
Business Accounts
Answer for Membership
by: mwecomputersPosted on 2009-10-14 at 09:19:07ID: 25572227
On the server, add use the following:
4 -j ACCEPT
ips/linux- iptables-h ow-to-spec ify- a-rang e-of-ip-ad dresses-or -ports.htm l
aq/linux-d emilitariz ed-zone-ho wto/
iptables -A INPUT -p tcp --destination-port 3306 -m iprange --src-range 192.168.20.1-192.168.20.25
Reference:
Linux Iptables: How to specify a range of IP addresses or ports
http://www.cyberciti.biz/t
Linux Demilitarized Zone (DMZ) Ethernet Interface Requirements and Configuration
http://www.cyberciti.biz/f