Find the answer to your Linux question:
Results 1 to 2 of 2
hi, here's my configuration internet->router1->linuxbox->router2->pc how would I go about setting up iptables? tried different things but no avail. e.g. Code: /sbin/iptables -t nat -A POSTROUTING -o ath0 -j MASQUERADE ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2011
    Posts
    1

    iptables in a difficult configuration


    hi,
    here's my configuration

    internet->router1->linuxbox->router2->pc

    how would I go about setting up iptables?
    tried different things but no avail.
    e.g.
    Code:
    /sbin/iptables -t nat -A POSTROUTING -o ath0 -j MASQUERADE
    /sbin/iptables -A FORWARD -i ath0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
    /sbin/iptables -A FORWARD -i eth0 -o ath0 -j ACCEPT
    
    where ath0 is between router1 and linuxbox and
    eth0 is between linuxbox and router2
    still no internet on the pc, even though i can ping router2 on the linuxbox.
    any help?

    thanks in advance

  2. #2
    Just Joined!
    Join Date
    Feb 2011
    Location
    Zagreb
    Posts
    10
    Quote Originally Posted by ecko View Post
    hi,
    here's my configuration

    internet->router1->linuxbox->router2->pc

    how would I go about setting up iptables?
    tried different things but no avail.
    e.g.
    Code:
    /sbin/iptables -t nat -A POSTROUTING -o ath0 -j MASQUERADE
    /sbin/iptables -A FORWARD -i ath0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
    /sbin/iptables -A FORWARD -i eth0 -o ath0 -j ACCEPT
    
    where ath0 is between router1 and linuxbox and
    eth0 is between linuxbox and router2
    still no internet on the pc, even though i can ping router2 on the linuxbox.
    any help?

    thanks in advance
    Hello,

    Do U use NAT on router2?
    Do U have additional iptables rules on linuxbox?
    Can U ping interface on linuxbox?

    BR
    Dino

Posting Permissions

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