Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Routing issue? [SOLVED]

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
3 posts • Page 1 of 1
Author
Message
anonybosh
Guru
Guru
Posts: 324
Joined: Sun Nov 20, 2005 1:45 am

Routing issue? [SOLVED]

  • Quote

Post by anonybosh » Sun Aug 08, 2010 11:32 pm

Hi,
I have a gentoo box connected to 3 networks - eth0 (192.168.0.30) -> internet; bond0 (192.168.1.1) -> private subnet; eth3 (192.168.2.1) -> wifi/public subnet.
I have iptables running, and block the traffic forwarding from each subnet to the others, ie. the machine @ 192.168.1.130 can't ping the machine @ 192.168.2.87, or vise versa.
The issue that I am having is that from eth3, I can access services that are bound to the other 2 interfaces (eth0 and bond0) on the SERVER, which I do NOT want (http, ssh, smb).
ie. From a laptop on the wifi from eth3, I can ping/access eth0 (192.168.0.30) and bond0 (192.168.1.1) and their services.
I can verify that the same is the case from the bond0 subnet as well-- I can ping/access each of the other interfaces (eth0, eth3).
I want to compartmentalize them so that this doesn't happen. I have a suspicion that it has to do with loopback, but I don't know.

Any ideas?
TIA,
-Ryan
Last edited by anonybosh on Sun Aug 08, 2010 11:57 pm, edited 1 time in total.
Top
Hu
Administrator
Administrator
Posts: 24401
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Aug 08, 2010 11:44 pm

You could add iptables rules in the filter table INPUT chain to drop traffic entering on eth0 not destined for the eth0 IP address, entering on bond0 not destined for the bond0 IP address, etc.
Top
anonybosh
Guru
Guru
Posts: 324
Joined: Sun Nov 20, 2005 1:45 am

  • Quote

Post by anonybosh » Sun Aug 08, 2010 11:56 pm

So that seems to work!

Code: Select all

iptables -A INPUT -i bond0 -d 192.168.2.0/24 -j DROP
Thank you much!
Top
Post Reply

3 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic