|
|
Routing / Fire Wall / Proxy Cache |
| Questions regarding routing or fire wall rules.
address-suppressed | |
| Subcategories:
Answers in this category: | |
|
|
How do I setup Traffic Rerouting (port forwarding)? |
Applies to: NetMAX Version 2.2 NetMAX 3.0 - 4.0x: Please see the user's manualaddress-suppressed | |
|
This example makes the following assumptions:
Here are the steps that you must take. You may already have performed some of these steps, in which case you may skip the steps that you don't need.
DON'T FORGET TO SET THE DEFAULT GATEWAY ON YOUR FTP AND WEB SERVER TO BE THE INTERNAL IP ADDRESS OF YOUR NETMAX (192.168.0.1). Then for the clients to access these services, they will actually want to use the NetMAX's public IP address and appropriate port. Each time you add an incoming and redirection address, you are telling NetMAX to redirect all UDP and TCP traffic for that incoming port. Notes: Traffic Rerouting is only available from NetMAX L22Pv2.2 Fire Wall and Professional and it only works on traffic coming in through the defined external address and port, so it will only work on traffic coming in through the external interface (more than likely this means that you'll need to test it from another network).
NetMAX Version 3.0 and above also include a traffic rerouting feature, but it is available from the Reroute tab in Home|Network|Routing. Please see your user manual for further instructions.
| |
|
|
How do I enable NAT? |
| Applies to: NetMAX version 2.0 - 4.0x
address-suppressed | |
NAT does OUTBOUND traffic translation on forwarded (routed) IP packets. You will only be able to enable NAT on one interface, and it will automatically do NAT for multiple internal networks (each with it's own gateway interface on the NetMAX)
If you need to do NAT on more than one outbound interface, then you will not want to use the check box above, as it will not suit your needs. Instead, you'll need to create some custom FORWARD firewall rules with IPMASQ enabled. More information on this is available in the here.
| |
|
|
I have more than one NIC in my NetMAX machine, how do I enable routing between them? |
| Applies to: NetMAX version 2.1 - 4.0x
address-suppressed | |
L2.2Pv2.1There is a problem with NetMAX Fire Wall/Professional version L2.2Pv2.1 where routing between networks is disabled by default, not allowing NetMAX to act as a router. To enable routing (if your route table allows it), type the following command at the command line:
echo 1 > /proc/sys/net/ipv4/ip_forward You can also ensure that this is enabled whenver your NetMAX machine is rebooted by adding this command to your /etc/start_if.generic file. Make sure that you enter the command below the line containing the command "/usr/netmax/etc/rc.d/natd.sh restart". Routing will then be enabled whenever you reboot the NetMAX server. This problem only applies to NetMAX L22Pv2.1 and can also be resolved by installing the L22Pv2.2 upgrade which is available at http://www.netmax.com/support/downloads.html
L2.2Pv3.xIn the interest of security, NetMAX FireWall/Professional version L2.2Pv3.1 and later only forwards traffic between "known" network interfaces (by default). This means that routing between all network interfaces will work fine; however, traffic with a source or destination address not on any of those known networks will not be forwarded (routed). This means that if you are using your NetMAX as a gateway to the Internet, more than likely you will be able to route traffic from your internal network to your ISP's network, but not past your ISP's network. Although this is intended, it is was not documented in the manual. The easy way to do this is to change your default forward policy to accept which will allow all traffic (traffic with a source or destination address on other networks) to use your router, you will want to issue the following commands from the command line, logged in as root:
echo /sbin/ipchains -P forward ACCEPT >> /etc/rc.firewall.local chmod +x /etc/rc.firewall.local /etc/rc.firewall.local The more secure method would be to add custom firewall forward rules to each interface that will statically allow the routing between the two network cards for all traffic. If you are doing NAT, no forward rules are created by default. So if you have more than one internal network interface, routing between the internal networks will not be allowed, by default. So you will have to manually create custom forward rules, or change the default forward policy, same as above.
L2.4Pv4.0xIn the interest of security, NetMAX FireWall/Professional version L2.2Pv3.1 and later only forwards traffic between "known" network interfaces (by default). This means that routing between all network interfaces will work fine; however, traffic with a source or destination address not on any of those known networks will not be forwarded (routed). This means that if you are using your NetMAX as a gateway to the Internet, more than likely you will be able to route traffic from your internal network to your ISP's network, but not past your ISP's network. Although this is intended, it is was not documented in the manual. The easy way to do this is to change your default forward policy to accept which will allow all traffic (traffic with a source or destination address on other networks) to use your router, you will want to issue the following commands from the command line, logged in as root: NetMAX 4.x uses iptables instead of ipchains, so the command to change the default forward policy is slightly different from L2.2Pv3.x. Please note that we strongly recommend creating custom firewall rules for forwarding instead of changing the default forward policy. Custom firewall rules are more secure, will be backed up with the NetMAX configuration backup, do not require command line access, and will be retained during upgrades.
echo /sbin/iptables -P FORWARD ACCEPT >> /etc/rc.firewall.local chmod +x /etc/rc.firewall.local /etc/rc.firewall.local The more secure method would be to add custom firewall forward rules to each interface that will statically allow the routing between the two network cards for all traffic.
If you are doing NAT, no forward rules are created by default. So if you have more than one internal network interface, routing between the internal networks will not be allowed, by default. So you will have to manually create custom forward rules, or change the default forward policy, same as above.
| |
|
|
How can I get ICQ to work behind my NetMAX firewall? |
| Applies to: NetMAX version 3.0 - 4.0x
address-suppressed | |
First, choose the "ICQ Exception" rule in your firewall. The ICQ firewall exception will not allow you to send ICQ messages from behind your firewall alone. You will need to make some modifications to your ICQ settings as well for it to work for you.
address-suppressed | |
|
|
How do I setup port forwarding (on FreeBSD)? |
| Applies to: NetMAX FreeBSD versions
address-suppressed | |
|
Port forwarding is not available in the FreeBSD NetMAX FireWall
interface.
However, we believe that the following command line settings using natd may provide the port forwarding functions. These settings have not been completely tested and are provided as a courtesy to you. Feedback and/or questions regarding it are welcome. If you have NAT enabled on the NetMAX, then it is simple to create rules to redirect incoming and outgoing IP traffic when using the NetMAX as a router. For example, if you wanted to have all accesses to the NetMAX's web server redirected to another machine's web server, you'd need three firewall rules (you can add these to the rc.local file):
ipfw add 10 divert natd tcp from otherwebserver 80 to any ipfw add 11 divert natd tcp from any to otherwebserver 80 ipfw add 12 divert natd tcp from any to netmaxIP 80 Also, you'll need to edit the /etc/natd.conf file and add a line that reads:
redirect_port tcp otherwebserver:80 80 Then run: kill `cat /var/run/natd.pid` && natd -f /etc/natd.conf
Feel free to contact us if you have further comments or questions.
| |
|
|
Why does a route I entered not get created, even though NetMAX doesn't give me any errors? |
| Applies to: NetMAX version 2.0 - 3.0
address-suppressed | |
| When you enter routes in the advanced routing table you need to specify networks as the destination and not individual computers. Your networks must also match the netmask you are entering. The netmax will not provide an error if you do this, however it will not enter the routes into the system.
For example: This would be invalid because a Class C (255.255.255.0) network always has a network that ends in x.x.x.0, this example shows a computer on the network and not the network itself.
This would work if the following were entered:
You would now be able to reach the computer 10.8.2.2 through router 192.168.8.1
| |
|
|
Why does my telnet session through my NetMAX FireWall time out? |
| Applies to: NetMAX version 2.0 - 3.x
address-suppressed | |
|
If you are doing NAT on your NetMAX Fire Wall, you are probably experiencing the IP masquerading timeout associated with doing NAT.
This timeout is to prevent you from running out of available ports to use for NAT. The NetMAX interface does not include a feature that would allow you to adjust the timeout, however you are free to adjust it. You may want to read the man pages for ipchains, especially the -S parameter, and also our Knowledge Base article located at:
http://www.netmax.com/fom/cache/266.html
| |
|
|
Can I specify certain URLs that I don't want cached? |
| Applies to: NetMAX version 3.0
address-suppressed | |
|
The NetMAX Interface for the Proxy Caching Server in NetMAX FireWall/Professional for L2.2Pv3.0 does not support this feature.
If you wish to manually maintain the configuration file for the Squid proxy server, you may find it located at /etc/proxycache.conf
If you make manual changes to the file, please also see the article located at:
http://www.netmax.com/fom/cache/266.html
| |
|
|
Are SSL-secure websites cached? |
| Applies to: NetMAX version 3.0 - 4.0x
address-suppressed | |
|
By default, the Proxy Caching Server proxies and caches SSL-secure websites. However, most secure web sites will send a directive to the proxy server to NOT CACHE the secure content, which will result in it not being cached.
This is Internet standard behavior.
| |
|
|
How do I prevent large files from using up all of my cache space? |
| Applies to: NetMAX version 3.0 - 4.0x
address-suppressed | |
|
By default, the Proxy Caching Server, when enabled, is only going to cache files under 1000KB in size. This can be adjusted through the NetMAX Interface under Home|Services|Proxy Caching Server, by editing the "Maximum Object Size" entry.
In general, the smaller the size, the faster the cache will respond. The larger the size, the less bandwidth you will use. You should find yourself a happy medium.
This is explained in the Online Documentation and in the User Manual.
| |
|
|
What services can the Proxy Caching Server handle? |
| Applies to: NetMAX version 3.0 - 4.0x
address-suppressed | |
|
The Proxy Caching Server provides caching, filtering, and monitoring of HTTP and FTP traffic. The Proxy Caching Server provides a transparent interface to outside networks by requesting HTTP and FTP data for clients.
This is explained in the Online Documentation and User Manual.
Although it is not mentioned, the NetMAX should be capable of also proxying Gopher and WAIS traffic.
| |
|
|
How do I force my clients to use the Proxy Caching Server for accessing web services? |
| Applies to: NetMAX version 3.0 - 4.0x
address-suppressed | |
|
A proxy caching server's primary function is to cache Internet data for client requests in order to speed up the response time to requests for the same data.
Because of the large number of client requests needed to actually make a proxy caching server pay off in the way of speed versus just routing the requests directly to the content servers, it has quickly become popular for smaller organizations to use them more for their additional features, such as controlling access to content servers.
The decision to force your clients to use the proxy server for FTP and HTTP services can be implemented in many ways. The easiest way may be to implement some firewall rules.
| |
|
|
I can't login to a Microsoft NT Domain Conroller through a NetMAX FireWall. |
| Applies to: NetMAX version 2.0 - 4.0x
address-suppressed | |
|
If you are doing NAT, then logons and trusts will fail with one of the following messages:
"A domain controller for your domain could not be contacted. You have been logged on using cached account information. Changes to your profile since you last logged on may not be available." "Could not find domain controller for this domain." The error messages and conditions may not be consistent even though you may still be able to sucessfully redirect a drive across the NAT, and browse across the NAT. The reason why this does not function, is because the source IP address in the NetBIOS header will not be translated with IP NAT.
More information on this is available on Microsoft's web site, in Knowledge Base Article ID: Q172227.
| |
|
|
Is there a more technical white paper available for my firewall? |
Applies to:
address-suppressed | |
|
Firewall Tutorial For NetMAX Firewall (Linux)
This tutorial assumes basic networking knowledge. The NetMAX firewall is a packet filtering firewall. This means that as each IP packet is processed by the kernel, only the IP characteristics are examined without state or content examination. The IP characteristics include one or more of the following:
Under Linux, firewalls rules are broken into three categories:
Technically, a command-line user can create more categories, but this functionality is not supported. Each category of firewall rules contain a separate list of characteristics which are used to determine if an action should be taken on the IP packet. Actions include:
The list of characteristics are applied in the order that they are defined within the kernel (therefore giving the first rule the highest priority, the second the next priority, and so on). When the kernel examines the IP characteristics of an IP packet, the list of characteristics is examined until there is a match. If there is no match, no rule is applied. For the following examples, let us define three input rules with the following priorities, characteristics, and actions:
Example 1: Incoming packet with Source: 192.168.0.1, Destination: 192.245.33.1 RESULT: Input Rule #1 applies, therefore the IP packet is ALLOWED. Example 2: Incoming packet with Source: 192.168.199.1, Destination: 192.245.33.1 RESULT: Input Rule #3 applies, therefore the IP packet is DENIED. This is because neither #1 nor #2 apply to this packet. Example 3: Incoming packet with Source: 10.1.1.1, Destination: 192.245.33.1 RESULT: Input Rule #3 applies, therefore the IP packet is DENIED. Example 4: Incoming packet with Source: 10.1.1.45, Destination: 10.2.2.99 RESULT: Input Rule #2 applies, therefore the IP packet is ALLOWED. We can get more specific by including more IP characteristics. For the following examples, let us define input rules are follows:
Example 1: Incoming packet with Source: 192.168.0.1, Destination: 192.245.33.1, Protocol: UDP RESULT: Input Rule #3 applies, therefore the IP packet is ALLOWED. #1 does not apply because the protocol is not TCP. Example 2: Incoming packet with Source: 192.168.0.1, Destination: 192.245.33.1, Protocol: TCP, Port: 23 RESULT: Input Rule #1 applies, therefore the IP packet is DENIED. Example 3: Incoming packet with Source: 99.99.99.1, Destination: 88.88.88.2, Protocol: TCP, Port: 23 RESULT: Input Rule #3 applies, therefore the IP packet is ALLOWED. Rule #3 is necessary with L22Pv3.0x because the default action (no rules apply) is to DENY the packet. ---- Rules of order The next thing to understand about Linux firewalls is the order that categories are processed: Input, Forward, and then Output. Therefore, as a packet is received by the kernel, input rules are checked first, forward rules second, and output rules last. From the IPCHAINS-HOWTO http://metalab.unc.edu/pub/Linux/docs/HOWTO/IPCHAINS-HOWTO
----------------------------------------------------------------
| ACCEPT/ lo interface |
v REDIRECT _______ |
--> C --> S --> ______ --> D --> ~~~~~~~~ -->|forward|----> _______ -->
h a |input | e {Routing } |Chain | |output |ACCEPT
e n |Chain | m {Decision} |_______| --->|Chain |
c i |______| a ~~~~~~~~ | | ->|_______|
k t | s | | | | |
s y | q | v | | |
u | v e v DENY/ | | v
m | DENY/ r Local Process REJECT | | DENY/
| v REJECT a | | | REJECT
| DENY d --------------------- |
v e -----------------------------
DENY
This makes it possible to receive a packet with a particular set of characteristics but not send one with the same. ---- Forwarding rules Assuming the input rules are such that the input rules allow a packet to continue to be checked for its characteristics, the forwarding list of rules will be applied. Forwarding rules have two mode: plain and masquerade. For a "plain" forward rule, the source IP address remains unchanged and for a "masquerade" forward rule, the srouce IP address is changed to that of the network interface which is receiving the packet. The most commonly used forwarding rule is the basic masquerading, referred to at NAT within the NetMAX interface (this is a legecy term from the original FreeBSD version which has a "true" NAT). This rule says to forward with masquerade any UDP or TCP traffic from any address to any address. By selecting the NAT option within a network interface's interface (Home|Network|Interfaces), a forward masquerading rule is created for all traffic THROUGH the selected interface. NAT is usually enabled on the network interface which connects to the Internet so that traffic bound to an IP address not within the LAN is made to appear as if it comes from the IP address of the NetMAX on the Internet.
---- When are manually entered forwarding rules necessary? (Some examples) A. You are connected to a complex network an do not want all traffic to be NAT'ted. Take this network as an example:
[10.1.1.1] [10.254.1.1] [192.1.1.1]
[Machine 1] <--> [Router 1 ] <--> [Router 2 ] <--> Internet
[192.1.1.2 ]
Machine 1: a completely internal machine If Router 1 is set up with the generic masquerade rule (from anywhere to anywhere) on the 192.1.1.2 interface, then traffic from 10.* to 192.* will always appear to originate from 192.1.1.2 because its traffic will be masqueraded. In addition, traffic from 192.* (sort of excluding Router 1) to 10.* will appear to have a source address of 192.1.1.2. It might be desirabled (for file sharing purposes, for example) to NOT masquerade the traffic to 192.* from the 10.* network. Therefore, forwarding rules can be added with the following properties: ACCEPT FORWARD from 10.0.0.0/8 to 192.1.1.0/24 ACCEPT FORWARD from 192.1.1.0/24 to 10.0.0.0/8 Therefore, the 192 and the 10 networks can communicate without having IP addresses translated. o Router 2 should have firewall rules which prevent access to the 10.* network. Most ISPs will not route 10.* traffic, but one can never be too careful. The NetMAX rules for "Block IP address spoofing attacks (external traffic with internal IP addresses)" automatically includes rules to block several categories of traffic which ISPs should never route. B. You have a hybrid public/private IP network:
Internet
|
|
[192.2.2.1]
[Router 2 ]
[192.1.1.1] [10.1.1.1]
| |
| |
[Machine 2] [Machine 1]
[192.1.1.2] [10.1.1.2 ]
In this example, the 192.* addresses are public and the 10.* addresses are private. Enabling NAT on the 192.2.2.1 interface is probably not desired because the 10.* AND the 192.1.1.* machines will be masqueraded. Therefore, we should set up manual masquerading and forwarding rules.
(traffic destined for the Internet IS masqueraded, there should also be a rule to block traffic from 10.0.0.0/8 on the input of the 192.2.2.1 interface) ---- Interesting command-line uses of the IPCHAINS command
---- Adding firewalls rules which cannot be defined within the NetMAX interface Starting with L22Pv3.0, the /etc/rc.firewall script now checks for an executable file in /etc/rc.firewall.local and runs the program (probably users will want to use a "shell" script). Example script (remember to chmod +x /etc/rc.firewall.local):
#!/bin/sh /sbin/ipchains -M -S 3600 0 0
This sets the timeout value for TCP connections to 1 hour (60*60), the FIN
and UDP connections are unchanged because of the zeros. The default is
15 minutes such that telnet sessions without traffic for 15 minutes are
disconnected.
| |
|
|
After the nightly log truncation, my proxy caching logging stops. |
| Applies to: NetMAX FireWall and Professional version 3.x
address-suppressed | |
|
There is a problem in the L2.2Pv3.x version of NetMAX FireWall/Professional.
When the log truncation rotates the squid proxy caching server's logs, the logging is not restarted with the correct configuration file. The work around is to edit the /usr/netmax/bin/truncsyslog.sh file. Edit the line that reads:
/usr/netmax/bin/squid -k rotate So that it reads:
/usr/netmax/bin/squid -k rotate -f /etc/proxycache.confAfter saving the changes to this file, you must restart the proxy server. The easiest way to do this may be to reboot your NetMAX. address-suppressed | |
|
|
My proxy caching server's logs are showing statistics from Dec 31, 1969. |
| Applies to: NetMAX version 3.x
address-suppressed | |
|
This just indicates that your proxy caching server's logs are empty.
If you believe that the logs should not be empty, please see this article.
| |
|
|
My proxy cacheing server is using too much of my memory, what is wrong? |
| Applies to: NetMAX version 3.x
address-suppressed | |
|
There is a problem in the L2.2Pv3.x version of NetMAX FireWall/Professional.
Under Home|Services|Proxy Caching Server, the NetMAX interface shows the Cache RAM Size in MB. It is actually entered as a percentage of the available memory. So if you have 256 MB of memory available, and you enter 64, it is not going to use 64 MB of memory, it is going to use 64% of your memory (163.84). Also, your Cache Swap Size has to be larger than the Cache RAM size. So if you specify more Cache RAM than Cache Swap, your Proxy Caching Server will not restart (and there will be no message indicating the problem).
Note: The Cache Swap Size should still be specified in MB.
| |
|
|
How do I interpret my FireWall(kernel) logs? |
| Applies to: NetMAX version 3.x
address-suppressed | |
|
Here's an example entry that you may find in your /var/log/kernel.log after creating some firewall rules with logging enabled:
Oct 6 15:52:15 netmax kernel: Packet log: input DENY eth1 PROTO=6 192.168.0.1:2978 10.0.0.1:139 L=60 S=0x00 I=58438 F=0x4000 T=64 SYN (#3) This logging is done by syslog and places our firewall messages in the kernel.log because we are using kernel firewalling (using IPCHAINS). Each "field" is seperated by a space or a colon and provides the following information:
Basically what this message tells us is that someone attempted to establish (SYN) a TCP (PROTO=6) connection to port 139 at 10.0.0.1 from port 2978 on 192.168.0.1. Since we know that Windows File Sharing (CIFS) uses TCP port 139, we can determine that this "person" at 192.168.0.1 was attempting to connect to any Windows shares that we had available on 10.0.0.1. Here's a list for determining the Internet Protocol with the PROTO number:
| |
|
|
Do the L2.2Pv3.x FireWall products include Traffic Rerouting? |
| Applies to: NetMAX version 3.x FireWall Products
address-suppressed | |
|
The NetMAX FireWall Suite, FireWall ProSuite, and Professional do include Traffic Rerouting.
In this new version, it is now accessed from the REROUTE tab under Home|Network|Routing. This is documented incorrectly in the manual, as the manual still refers to the L2.2Pv2.x location of Home|Network|Traffic Rerouting.
The NetMAX FireWall Retail product does not include the Traffic Rerouting feature.
| |
|
|
CGIs won't work through my NetMAX proxy. What can I do? |
| Applies to: NetMAX version 3.0 - 4.0x
address-suppressed | |
|
CGIs won't work through my NetMAX proxy. What can I do?If you are having trouble using cgi's through your proxy you need to uncomment a few lines in some files. In your NetMAX interface go to | Home |Personal and click on root under files management.
In root browse to this directory:
acl QUERY urlpath_regex cgi-bin \?Save the file.
Browse back to root. From root browse to etc and click on the file proxycache.conf to edit it.
acl QUERY urlpath_regex cgi-bin \?Save the file.
Browse back to root. From root browse to:
acl QUERY urlpath_regex cgi-bin \?Save the file.
After you have made the changes to these files you will need to restart the proxy. To do so you must log in to the command line interface using telnet or logging into the console.
Now that you are logged in as the root user you can restart the proxycache server by typing: /usr/netmax/etc/rc.d/proxycache.sh restart
Now you will be able to use CGIs on computers using your proxycache.
| |
|
|
I locked myself out of NetMAX with firewall rules. What can I do? |
| Applies to: NetMAX version 2.0 - 4.0x
address-suppressed | |
I locked myself out of NetMAX with firewall rules. What can I do?
address-suppressed | |
|
|
My traffic rerouting isn't working what can I do? |
| Applies to: NetMAX versions 3.0, 3.01, and 4.0
address-suppressed | |
Traffic Rerouting is not working. What can I do?If you are running versions L2.2Pv3.0 or L2.2Pv3.01 you need to upgrade to L2.2Pv3.1 in order for traffic rerouting to work. If you are running version L2.4Pv4.0, you need to upgrade to L2.4Pv4.01 in order for traffic rerouting to work.
Also, make sure that the ports you are rerouting are not firewalled off on the NetMAX. If traffic is being denied to those ports on the NetMAX interface, it will not be possible to reroute it. To fix this, simply create Server rules, or Input/Output rules for the ports that you are rerouting, specifying the NetMAX IP as the source or destination of the traffic.
| |
|
|
How do I get my Proxy Cacheing Server to listen on multiple addresses? |
| Applies to: NetMAX version 3.0 - 4.0x
address-suppressed | |
|
You can't do this in the NetMAX Interface. However, you can do this from the command line.
The file you'll need to edit is /etc/proxycache.conf At the bottom of this file, you'll find the line: http_port 3128 You'l want to replace that line with the following line: http_port 192.168.0.1:3128 10.1.2.3:3128 Of course, you'll want to use your IP addresses, and not the ones listed. Then, to stop NetMAX from overwriting these changes, you'll need to edit the /etc/commit.conf file, and add the following line: skip /etc/proxycache.conf
If you ever need to make any changes to your proxy server configuration in the NetMAX Interface, you'll want to remove the line from the /etc/commit.conf file, commit your changes, then perform the above steps again.
|
| Previous: |
|
| Next: |
|
| ||||||||