LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 06-18-2008, 01:17 PM   #1
mamad876
LQ Newbie
 
Registered: Apr 2008
Posts: 3

Rep: Reputation: 0
Unhappy Bridging and Masquerading problem!


Hello all,

I have a problem setting up network bridging + masquerading on my Linux server box (Ubuntu Gutsy Gibbon).

I have a networking bridge setup like this:
/etc/network/interfaces
Code:
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.1.1
        netmask 255.255.255.0
        pre-up iptables-restore < /etc/iptables.up.rules

allow-hotplug benp0
iface bnep0 inet static 
        address 192.168.1.1
        netmask 255.255.255.0

# The bridge for PAN
auto pan0
iface pan0 inet manual
        up   echo       "Adding ethernet bridge between LAN and PAN"
        up   ifconfig   eth0 0.0.0.0
        up   brctl      addbr pan0
        up   brctl      setfd pan0 3
        up   brctl      stp pan0 on
        up   brctl      addif pan0 eth0
        up   ifconfig   pan0 192.168.1.1 netmask 255.255.255.0 up
        down echo       "Removing ethernet bridge between LAN and PAN"
        down ifconfig   pan0 down
        down brctl      delif pan0 eth0
        down brctl      delbr pan0

auto dsl-provider
iface dsl-provider inet ppp
pre-up /sbin/ifconfig pan0 up # line maintained by pppoeconf
provider dsl-provider
also in:
/etc/bluetooth/pan/dev_up
Code:
brctl addif pan0 $1
ifconfig $1 0.0.0.0
so, I have a bridge pan0 that initially has eth0 in one port and adds bnep0 to another port when it's available.

Also I have masquerading enabled in IPTalbes.

My problem is:
MASQUERADE is not functioning???
I can ssh to my server, I can ping my ppp0 IP in server, I can use NFS and what ever I want BUT my requests to the outside work is not working.

Also I checked the MASQUERADE with tcpdump -i ppp0 and I saw that requests from my clients are translated and go through ppp0 but THERE IS NOT REPLAY to this requests at all.

I'm really getting nuts because of this problem.!

DOES ANYONE KNOW WHERE IS MY MISTAKE???

thank you very much!
 
Old 06-19-2008, 05:56 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
I may be wrong but may I ask why eth0 and benp0 have same IP address ?
 
Old 06-19-2008, 12:46 PM   #3
mamad876
LQ Newbie
 
Registered: Apr 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Actually after bridging there will be no IP address for eth0 and bnep0.
check lines:
[code]
ifconfig eth0 0.0.0.0
...
ifconfig bnep0 0.0.0.0

also I have no problem with local LAN, there is a problen only with masqurading.

Thanks.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
VMWare's bridging vs Window's bridging - routing is messed up when Windows bridging brenan99 General 0 05-04-2008 10:24 PM
Bridging Problem asadz Linux - Wireless Networking 2 09-30-2007 01:00 AM
Bridging+Bonding for Bridging+HA+Load Balancing? kartheekpn Linux - Networking 0 08-13-2006 02:08 AM
Bridging Problem SneakerElph Linux - Networking 5 08-09-2005 03:06 PM
bridging problem mcirsta Linux - Networking 0 05-05-2005 02:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:48 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration