Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do i forward traffic from 2 interfaces ??
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
phreak_coder
n00b
n00b


Joined: 29 Aug 2003
Posts: 43

PostPosted: Thu Nov 03, 2005 11:56 pm    Post subject: How do i forward traffic from 2 interfaces ?? Reply with quote

Ok i have 3 interfaces, 1 to the internet, 1 to my local LAN, and the other is my wireless network.
I can get either the wireless network connections working through NAT, or the LAN, but not both. i have been playing around with this for some time.
If someone could just post a few basic iptable rules that demonstrate forwarding traffic from 2 seperate interfaces, just so i know im on the right track.
many thanks.
Back to top
View user's profile Send private message
splooge
l33t
l33t


Joined: 30 Aug 2002
Posts: 636

PostPosted: Fri Nov 04, 2005 5:42 am    Post subject: Reply with quote

should be fairly straight forward...

iptables -t nat -A POSTROUTING -o ethx -j MASQUERADE

where ethx = your interface connected to the 'net.

Make sure your other networks use your gentoo box as their default gateway and ensure you have ip_forwarding enabled in sysctl and that's about all you should need.
_________________
http://get.a.clue.de
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum