Linux.com

weiwei

weiwei

  • Linux.com Member
  • Posts: 2
  • Member Since: 01 Apr 11
  • Last Logged In: 03 Apr 11

Latest Posts

Posted by
Topic
Post Preview
Posted
  • weiwei
    RE: linux firewall, iptables forwarding problem
    Thank you very much for replying, did the firewall check the default policy very last? weiwei
    Link to this post 03 Apr 11

    Thank you very much for replying, did the firewall check the default policy very last?
    weiwei

  • weiwei
    linux firewall, iptables forwarding problem
    Hi, I am new to the linux, but I need to set up a simple firewall for the local network. I have Ubuntu kernel 2.6 installed, two NIC cards with a one static IP address to internet, I am using bridge-utilities bridge two interfaces together. The bridge is up and fine. Now I am really stock at this point. I set default policy to DROP for Forward and enabled forwarding. Then add rules like these: iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P OUTPUT ACCEPT iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT the local computer can not access internet, but if I changed default FORWARD policy to ACCEPT, the local computer then can access internet. I really don't understand why, Please help! weiwei
    Link to this post 02 Apr 11

    Hi,
    I am new to the linux, but I need to set up a simple firewall for the local network.
    I have Ubuntu kernel 2.6 installed, two NIC cards with a one static IP address to internet, I am using bridge-utilities bridge two interfaces together. The bridge is up and fine.
    Now I am really stock at this point.
    I set default policy to DROP for Forward and enabled forwarding.
    Then add rules like these:
    iptables -P INPUT DROP
    iptables -P FORWARD DROP
    iptables -P OUTPUT ACCEPT

    iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
    iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT

    the local computer can not access internet, but if I changed default FORWARD policy to ACCEPT,
    the local computer then can access internet.
    I really don't understand why, Please help!
    weiwei

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board