PDA

Bekijk de volledige versie : Ipatables help



TchenoPT
10-03-2010, 20:22
Hi all!

Being that I am complete linux noob, I need your help in configuring the iptables on both my routers.
Here's the thing, I'm running a WL-500GP as my Gateway and a WL-500g mainly as an AP.
So my though was to make good use of the hardware and so I've set them up as follows:

WL-500GP (Gateway)
(250HDD - USB)
lighttpd
PHP
Mysql
rtorrent
rrd
samba
vsftp

WL-500g (AP)
(2GB - USB Flash)
printserver
vsftpd
samba
lighttpd
xmail

so now that you know my setup, here's my question, how do I setup ipatables on both routers in order for mysql to be closed on the WAN side and open on the inside (I use a port forward to access wl-500g lighttpd and vsftpd).

Thanks in advance!

Tamadite
10-03-2010, 21:07
You do not give enough information to give you a suggestion.

Are both routers working on the same LAN IP segment? Is the LAN on G the same as on GP?
How is G connected to GP?
How many Internet gateways do you have on your setup?

TchenoPT
11-03-2010, 12:43
You do not give enough information to give you a suggestion.

Are both routers working on the same LAN IP segment? Is the LAN on G the same as on GP?
How is G connected to GP?
How many Internet gateways do you have on your setup?

GP (192.168.1.254) is the Gateway of 192.168.1.X and G is on the same network (192.168.1.1)

G -> GP -> WAN

Tamadite
14-03-2010, 23:27
iptables -I INPUT -p tcp --dport 3306 -j DROP

You will type the above line on the GP router

TchenoPT
17-03-2010, 11:34
iptables -I INPUT -p tcp --dport 3306 -j DROP

You will type the above line on the GP router

Thank you so much!

By the way, do you know of any php iptaples admin i can use?

Tamadite
14-05-2010, 23:51
By the way, do you know of any php iptaples admin i can use?

You can use the WL-500gP user interface; it makes use of iptables. It is rather good and it covers most of the necesities of ordinary users; furthermore, the rule I gave you can be set using the WL-500gP user interface.