Find the answer to your Linux question:
Results 1 to 5 of 5
I'm using Debian with a iptables firewall script (Arno's). It works very well. In the config I have choosen to only open up small amounts of ports needed and every ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2008
    Posts
    2

    Iptables / Allow all traffic to from private IP?


    I'm using Debian with a iptables firewall script (Arno's). It works very well.
    In the config I have choosen to only open up small amounts of ports needed and every else ports are blocked.

    How do I open up all traffic to/from this IP to the internet?

    My networks looks like following:

    eth0, Internet IP
    eth1, 192.168.1.2. Connected to this network is my workstation 192.168.1.3
    eth2, 192.168.2.2. Connected to this network is my laptops(192.168.2.3, 192.168.2.4) and Nintendo Wii(192.168.2.6).

    I want to allow all traffic to/from 192.168.2.6 to Internet.

    Thanks in advance.

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Code:
    iptables -A INPUT -i <iface> -s 192.168.2.6 -j ACCEPT
    <iface> being the interface that 192.168.2.6 is connecting to.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Simple:

    Code:
    iptables -A INPUT -i <iface> -s 192.168.2.6 -j ACCEPT
    <iface> being the interface that 192.168.2.6 is connecting to.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  4. #4
    Just Joined!
    Join Date
    Jul 2008
    Posts
    2
    Thanks for replying...

    That didn't do much for me :/

    When looking into the logfiles it still says:
    Jul 5 19:12:36 dzn kernel: LAN->INET denied: IN=eth2 OUT=eth0 SRC=192.168.2.6 DST=207.38.11.34 LEN=46 TOS=0x00 PREC=0x00 TTL=63 ID=359 PROTO=UDP SPT=51329 DPT=27900 LEN=26

    Seems like the iptables script is more advanced. Maybe hard to apply rules to this "Arno's IPTABLES Firewall Script" ?


    Edit:

    I have now suceeded... I did a whole reconfiguration of the script and now everything works. I had to configure for all IP's in the network.

    Thanks.

  5. #5
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Try this one then,

    Code:
    iptables -I FORWARD -s 192.168.2.6 -j accept
    Without knowing your script I can only take guesses. But looking at what you have posted the problem seems to be in the FORWARD table.

    The above sets IPTABLES to accept all traffic from 192.168.2.6 no mater what interface it comes in on and forward it.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

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