View previous topic :: View next topic |
Author |
Message |
ispano n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 18 Jul 2010 Posts: 13
|
Posted: Sun Jul 18, 2010 8:31 pm Post subject: |
|
|
And seeing as the command you posted last bypasses the rule for that ip, I think I'll use that. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mokia n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 01 Feb 2010 Posts: 63 Location: Hungary
|
Posted: Sun Jul 18, 2010 8:34 pm Post subject: |
|
|
use this:
-I FORWARD -d 192.168.100.1/32 -i eth1 -j ACCEPT
It allows the modem connection. But dint open your hole internal network for crackers.
Afther this rule
iptables-save looks like this:
# Generated by iptables-save v1.4.6 on Sun Jul 18 07:03:12 2010
*filter
:FORWARD DROP [0:0]
-A FORWARD -d 192.168.100.1/32 -i eth1 -j ACCEPT <-this must be on on top
-A FORWARD -d 192.168.0.0/16 -i eth1 -j DROP
-A FORWARD -s 192.168.0.0/16 -i eth1 -j ACCEPT
-A FORWARD -d 192.168.0.0/16 -i eth0 -j ACCEPT
COMMIT
# Completed on Sun Jul 18 07:03:12 2010
EDIT
Sorry for the forward |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ispano n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 18 Jul 2010 Posts: 13
|
Posted: Sun Jul 18, 2010 8:38 pm Post subject: |
|
|
Yeah I did use it, and it works fine. Looked at it after temporarily disabling "-A FORWARD -d 192.168.0.0/16 -i eth1 -j DROP" and it clicked what it did, so I re-enabled "-A FORWARD -d 192.168.0.0/16 -i eth1 -j DROP" and used your command.
Looks like this now:
-A FORWARD -d 192.168.100.1/32 -i eth1 -j ACCEPT
-A FORWARD -d 192.168.0.0/16 -i eth1 -j DROP
-A FORWARD -s 192.168.0.0/16 -i eth1 -j ACCEPT
-A FORWARD -d 192.168.0.0/16 -i eth0 -j ACCEPT
COMMIT
# Completed on Sun Jul 18 08:37:37 2010
I learn something new everyday with Gentoo, always a good thing.
Thanks again. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 23093
|
Posted: Sun Jul 18, 2010 10:00 pm Post subject: |
|
|
Normally, you would use that rule. Normally, it would work fine. Unfortunately, someone had the bright idea of putting an RFC1918 reserved address on a device designed to be on the Internet side of your router. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mokia n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 01 Feb 2010 Posts: 63 Location: Hungary
|
Posted: Mon Jul 19, 2010 5:13 am Post subject: |
|
|
I think this is the solution, for the RFC standard problem:
-I FORWARD -s 10.0.1.1/32 -i eth0 -j DROP
-I FORWARD -d 10.0.1.1/32 -i eth0 -j DROP |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|