This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

block ip addresses

Hello,

I have spent the last several days trying to understand subnetmasks in an effort to block ip address ranges.  Unfortunately, I am finding it very difficult to understand the subnetmask concept, and fear that the learning curve is unrealistic for my rather straightforward objective.

What I need to do is quite simple:  I would like to block all traffic except to a handful of external ip addresses.  

Is there an uncomplicated way to do this in Astaro without having an understanding of subnetmasks?


This thread was automatically locked due to age.
Parents
  • What I need to do is quite simple:  I would like to block all traffic except to a handful of external ip addresses.  


    Hi,
    Define networks definitions for the IPs/Networks, and put them all into a new Network Group definition.

    Then, create a packetfilter rule to allow the IPs/Network Groups you want to allow, followed by with a DROP rule to the "ANY" definition, for the services in question (or ANY service).

    Barry
  • Barry, that won't, for example, stop browsing if he's using the HTTP Proxy.

    A1, are you using or planning to use any of the proxies?
  • What things will you do with these nine external IPs?  What subscriptions do you have, or is this a home-use license?  Will your access be strictly via browser?  FTP? Remote Desktop?  

    Do these remote addresses need to be able to initate contact with the one PC?  With what protocols?

    etc.

    Cheers - Bob

  • I'm a little confused.  That's a few more than nine IPs!


    Bob,

    It is not you who are confused, but I!  [:$] I have gone quite beyond my limited experience in this field!  

    I used the subnet calculator that you posted above and misinterpreted the information that it provided.  I thought that 8.18.161.100 with netmask of /20 would block ip addresses in the range from 8.18.161.100 to 8.18.161.110, but as shown on the Subnet attachment, I realise now that that isn’t the case.

    I have now created host definitions (see IPs attachment) of the 9 individual ip addresses I need to access: 

    8.18.161.101
    8.18.161.102
    8.18.161.103
    8.18.161.104
    8.18.161.105
    8.18.161.106
    8.18.161.107
    8.18.161.212
    8.18.161.213

    If I were to disable the HTTP proxy, could I then implement the solution suggested by Barry above?


    What things will you do with these nine external IPs? What subscriptions do you have, or is this a home-use license? 


    This is a home use license.  I trade stocks online from home and these 9 external ip addresses are the ip addresses used by an online stock market data provider—I connect to one of these ip addresses and can download current stock prices.  So, they are not my ip addresses—I just need to connect to them.


    Will your access be strictly via browser? FTP? Remote Desktop?


    Acces is via a third party program that takes the data and displays it on a chart.


    Do these remote addresses need to be able to initate contact with the one PC? With what protocols?


    No, I initiate the contact from my end.  Once I start the third party program, it connects automatically to one of those 9 ip addresses.  Right now, I cannot recall the protocols used--I will get back to you on that.
  • So, you don't want to use this computer for anything other than as your "terminal" for trading?  In that case, let's turn off all of the proxies and only use the Astaro stateful firewall.

    Google on the name of the trading platform along with the words: firewall ports.  Since the Astaro is a statefull firewall, we only need to open outbound ports; Connection Tracking in the Astaro should recognize responses and let them through.

    You can create the following Network definitions to simplify:
    8.18.161.101/31
    8.18.161.103 (a 'Host')
    8.18.161.104/30
    8.18.161.212/31

    Create a Network group containing the above host and networks, and name it, for example: TradeNet (or the actual name of the platform)

    Locate/create the individual services and put them into a services group: TradeNet Services

    Create a Packet Filter rule: Internal (Network) -> TradeNet Services -> Tradenet : Allow

    Enable Masquerading: Internal (Network) -> External

    That should do it.

    This is truly the simplest possible use of the Astaro, and may be possible directly on your PC with the Windows Firewall.  The only difference being that the Windows Firewall is stateless, so you would need to open firewall ports in both directions.

    Cheers - Bob
  • Bob, thanks.  

    So, you don't want to use this computer for anything other than as your "terminal" for trading?  


    Yes, that's right!

    I didn't get any conclusive info on which port is used--the results in google were often slightly off topic in the sense that this program often uses third party plugins which themselves require ports to be open.  Currently the support website for the software is down--I have been trying to reach it for past 30 minutes and will keep trying, but I may have to wait until tomorrow.  

    When you say 
     Locate/create the individual services 
     what do you mean? [:)] How do I locate them?

    I know this is "truly the simplest possible use of the Astaro," but I'd rather take the time to figure out how to do it in Astaro rather than rely on Windows!  

    I will keep checking the support website and post here as soon as I can get definitive information.  I will also try to find out if the data provider requires any open ports.
  • Locate/create services in 'Definitions >> Services'.  After you get the port numbers, you can search on those numbers to find the names of the services as most will have been pre-defined by Astaro.

    Cheers - Bob
  • I understand.  

    I was finally able to get onto the support website for the program.  A support rep stated that the ports/protocols are determined by the data feed provider.  

    After a cursory glance on the data feed provider's website, I don't see any information regarding ports/protocols.  I will have to take a closer look tomorrow.   

    I will let you know how things work out.

    I can't thank you enough for all your help Bob--you've gone way beyond the call of duty.

    Thanks.
  • Hi, You mentioned DNS earlier... best bet is to set the PC to use Astaro as the DNS server, and then have Astaro use OpenDNS's free DNS servers.

    Barry
  • Sorry for dropping the thread for the past few days—I’ve had to turn my attention to other matters.

    I was unable to find any port/protocol information on the datafeed website and so had to use a packet sniffer to find the information manually.  

    It appears that the following ports and protocols are active



    I have created service definitions for the TCP protocols, however, I am not sure how to implement a service with HTTP as its protocol—Astaro provides the types TCP, UDP, TCP/UDP, ICMP, IP, ESP, AH, Group… but there is no HTTP option.  What would be the correct “type” for HTTP protocol in Astaro?

    Initially, I ignored the HTTP-based definitions, and created a service group with only the TCP-based definitons in the service group, but this made it impossible for the stock-trading program to connect to its datafeed.
  • HTTP is TCP, but there are already Service Definitions for HTTP and HTTPs.

    Barry
  • Thanks for the clarification, Barry.  

    I was able to get the program to connect to the datafeed after reversing the port settings--I had switched the destination/source port and that prevented the connection.  So, it looks like problem solved!
Reply
  • Thanks for the clarification, Barry.  

    I was able to get the program to connect to the datafeed after reversing the port settings--I had switched the destination/source port and that prevented the connection.  So, it looks like problem solved!
Children
No Data