LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 08-29-2007, 03:22 PM   #1
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian PPC/i386/AMD64 6/7, Vista, XP , WIN7, Server 03/08
Posts: 1,278

Rep: Reputation: 91
iptables rules to bridge traffic


Hey all some of you might be getting tired of my posts, about xen networking, sorry if that's the case but here is where I am with everything.

I have a dummy interface setup dummy0
I have actual interface wlan0

dummy0 is used to setup the bridged network with xen default network scripts. This works all right provided I set the IP settings manually in the windows VM. I can then ping the dummy0 interface, and ping the wlan0 interface (the assigned ip address -- 192.168.0.101) but I cannot ping the router for the wlan0 connection (192.168.0.1) or get out to the internet. I can only guess this has to do with forwarding packets from the dummy interface through the wlan0 connection.

Can anyone tell me the appropriate iptables rules to apply to make this work?
 
Old 08-31-2007, 07:20 AM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,850

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
You will want to put something like this into a script:

Code:
iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE
iptables --append FORWARD --in-interface dummy0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
The last line is important, since you need to tell the kernel to enable IP forwarding in addition to the iptables rules.
 
Old 08-31-2007, 12:05 PM   #3
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian PPC/i386/AMD64 6/7, Vista, XP , WIN7, Server 03/08
Posts: 1,278

Original Poster
Rep: Reputation: 91
Thank you for your reply, I had actually all ready tried that and it didn't work, what I ended up doing was setting up a squid proxy and setting the vm to use the proxy server and now all works well. It seems that the wlan0 interface didn't want to send anything not from the dom0 so it discarded everything from domU(vm).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables 1.27a still loading rules after installing iptables 1.3.0 yawe_frek Linux - Software 1 06-07-2007 09:50 PM
Fedora Core 5: Bridge, only allows pings to specific IP address. No other traffic big_ginge21 Linux - Networking 7 01-04-2007 07:49 PM
IPTABLES - rules in /etc/sysconfig/iptables The_JinJ Linux - Newbie 6 11-20-2004 01:40 AM
Remove traffic shaping rules gazzer82 Linux - Networking 5 10-21-2003 09:43 AM
iptables bridge firweall revres xunil Linux - Networking 5 08-25-2003 12:24 PM


All times are GMT -5. The time now is 08:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration