Find the answer to your Linux question:
Results 1 to 3 of 3
I'm trying to ensure that only the following two networks have access to my web server - running https only. 10.1.1.0/24 and 192.168.1.0/24 Could someone explain to me how this ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2010
    Posts
    4

    Confusion about iptables configuration


    I'm trying to ensure that only the following two networks have access to my web server - running https only.

    10.1.1.0/24

    and

    192.168.1.0/24

    Could someone explain to me how this is done? Note, I've never successfully used IPtables before, so feel free to talk to me like an idiot

    If needed, my distro is Ubuntu Server 10.4

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,672
    This should get your started;

    Code:
    iptables -P INPUT DROP
    iptables -P OUTPUT ACCEPT
    iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
    iptbales -A INPUT -m state --state NEW -s 10.1.1.0/24 --dport 443 -j ACCEPT
    iptables -A INPUT -m state --state NEW -s 192.168.1.0/24 --dport 443 -j ACCEPT
    This should get your further;

    IPTABLES TUTORIAL

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    May 2010
    Posts
    4

    Thanks a ton!

    That does it. Thanks!

Posting Permissions

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