Page 1 of 1

Blocking all remote IP addresses except one IP (on home net)

Posted: Sat Dec 11, 2010 3:32 pm
by webman
I am using OpenSUSE (latest). I have Apache2 on and I want to run a ftp server. I have configured Apache2 to allow incoming connections only from a particular IP which is on my home network (192.168.2.102). But it looks like it is more difficult to do this on the ftp server (pure-ftpd). So I want to ask if it is possible to configure my entire system to block remote access from ALL ip addresses except the one on my home network (specified above).

How to do that ?!

Re: Blocking all remote IP addresses except one IP (on home

Posted: Sat Dec 11, 2010 6:47 pm
by Celauran
Use iptables to block 0.0.0.0/0 and only allow 192.168.0.102

Re: Blocking all remote IP addresses except one IP (on home

Posted: Sat Dec 11, 2010 7:42 pm
by webman
Celauran wrote:Use iptables to block 0.0.0.0/0 and only allow 192.168.0.102
Thanks for the compact info. I have looked into how to configure that thing (there is a file special for custom rules for the OPenSUSE firewall). The files specifies those iptables...

Of course, I need to learn more now about iptables. I guess I will need to define two lines there a. the one that blocks all and then b. the one that allows that particular ip.

Re: Blocking all remote IP addresses except one IP (on home

Posted: Sat Dec 11, 2010 9:27 pm
by webman
Thanks. Mission accomplished! No further assistance is needed :)