Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2007
    Great mighty Czech Republic, in the heart of Europe :-)

    ADSL + Double NAT routing problem

    Hello to all Linux + Network guruz

    I have sort of interresting problem with my new network infastructure, and I could need your clever advice.

    My network infrastructure looks this way:
    Network device -> Fedora Router -> Local network
    Recently I moved from Cable to ADSL and I had to change my network organization slightly.
    Previous Cable configuration had dhcp relay, so my Fedora router had public IP address. But as ADSL modem supports no such function, I played with configuration and set up NAT of all incoming traffic from WAN side of modem to router on LAN. This works perfectly for most of network tasks, with exception of following one.

    I'm not sure if anyone here knows concept of Battlenet gaming zone, I'll try to explain shortly; People connect to the Battlenet server and see list of games, which they can join. They can also host games - but only if their PC can be reached from internet. In my case, this still works just fine. I can join to other games and host from PC on LAN (because I've set up port forwarding on router)

    Problem occurs when I try to host a game on Battlenet and would like my friend from other PC on LAN to connect to it. He can't.

    I thought about it, and I think it's because of that double NAT.
    When someone tries to connect to my game, Battlenet tells him, that IP adress of the game is IP of my ADSL modem.
    For people outside my LAN it's OK. They see the IP, and can connect to it (they get NATed to router and NATed/FORWARDED again to my PC on LAN where is the game created)
    When my friend from LAN tries to connect, Battlenet tells him again IP of the ADSL modem. But connection cannot be established, because ADSL modem does NAT only from WAN to LAN and not from LAN to LAN.

    I don't know how to solve this problem, and I wonder if it's even possible. But as ADSL modem has some sort of linux distro, I can telnet to it and run iptables commands I would like to try
    Could someone help please? Any ideas are welcome.

  2. #2
    Just Joined!
    Join Date
    Dec 2007
    Great mighty Czech Republic, in the heart of Europe :-)

    Thumbs up

    In my language someone said "Rano je moudrejsi vecera", which can be rougly translated as "Morning is more clever than evening", and it sems it works for me too Today I've solved my network problem using TWO COMMANDS!

    Suprisingly it was not on the ADSL modem, but on Fedora router. In last post I said, that I have port forwarding to PC in LAN. So in fact, all I needed was to convince packets with destination port 6112 going from LAN through Router to ADSL modem to return from Router to LAN. As there is port forwarding already in place, all I had to do was to redirect all packets from speciffied PC on LAN to forwarded port, using following two commands:

    iptables -t nat -I PREROUTING -p tcp -s --dport 6112 -j REDIRECT
    iptables -t nat -I PREROUTING -p udp -s --dport 6112 -j REDIRECT

    That's all folks!
    See ya in other posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts