Skip to main content
kcerb
New Member
September 26, 2008
Question

second IP on internal interface - problem

  • September 26, 2008
  • 12 replies
  • 11522 views
Hello, I added second IP address on internal interface (FortiGate 100A). I have also enabled Administrative Access - PING. The main IP address on this interface is 10.0.0.1/24 The second IP address on this interface is now 192.168.0.1/24 On Windows client PC I have main IP address: 10.0.0.23. Now I added additional IP address: 192.168.0.23 on network card properties. Why can`t I ping to 192.168.0.1 ? I have also other PC`s with 192.168.0.x addresses and I can ping to them.

    12 replies

    UkWizard
    New Member
    September 26, 2008
    Not sure if when you add a secondary IP, that the MAC address of the internal NIC would be the same for the first, but perhaps thats the issue? have a look by using the arp commands, like so; Show arp table # arp -a delete arp entry # arp -d 10.0.0.23 ping both IP' s and then look at the arp mac addresses for each. Why on earth you would want this kind of a setup is confusing though. I am presuming the client pc is on the same lan segment as the firewall interface.
    UkWizard
    New Member
    September 26, 2008
    whoops forgot to add, when you say you can ping to other machines on the 192.168.0.x network? are you saying that other pc' s have these secondary IP addresses and you can ping between themselves, but not to the fortigate?
    kcerb
    kcerbAuthor
    New Member
    September 26, 2008
    that`s correct UkWizard. I have a few test servers which are connected to the same phisical network but they have other IP subnet: 192.168.0.x. (only one IP address per network card) I can ping between themselves and I can ping from my PC client, who has two IP addresses (one 10.0.0.x, second 192.168.0.x) to those servers. I can`t ping from my client to fortigate and I can`t ping from test servers to fortigate.
    rwpatterson
    New Member
    September 26, 2008
    I have a similar situation with a second place I do work with. The solution I used was to have one IP address (per PC), and use the Fortigate to pass traffic between the LANs. Even though they are on the same wire, they need to pass through the FGT to see each other. Much less convoluted than the dual IP per machine method. All routing is done via the Fortigate with the added benefit of being able to control cross LAN traffic and bandwidth monitoring.
    kcerb
    kcerbAuthor
    New Member
    September 28, 2008
    I don`t want to see one network from another (except my client PC - one computer). All I want is internet access from the second subnet (192.168.0.x). In the second subnet I have only test PC`s and I want to Fortigate act as internet gate only.
    abelio
    SuperUser
    SuperUser
    September 28, 2008
    did you set an internal->wan firewall policy for 192.168.0.0/24 nat-enabled?
    kcerb
    kcerbAuthor
    New Member
    September 29, 2008
    abelio, yes I did. But I even can not ping to Fortigate.
    UkWizard
    New Member
    September 29, 2008
    if you take out the 192.168. address out from your client, can you then ping the fortinet IP within the same subnet (ie 10.xxx) Also, what do you have as your default gateways on your machine and the test network machines? if they are all correct, then you should be able to ping that interface. but if routing doesnt work between the two, you will need a INTERNAL -> INTERNAL rule as well to allow the ' bouncing' traffic. You should also need to have two address entries in the fortinet with their interfaces selected, ie not left as any. But for the record, this is really really bad practice to have two subnets existing on the same segment. Do you not have a spare interface you could put the second network onto? thats the preferred method. Else i would recommend you invest in a switch that supports vlans, then do it that way, by vlanning them right up to the fortigate. you can do some sinple diags using the sniffer, so on the cli of the fortigate, run the following and then try a ping to the interface, and see if it hits it. if it doesnt, your switch must be screwing things up, potentially because of the dual subnet existence. # diag sniff packet any ' icmp'
    kcerb
    kcerbAuthor
    New Member
    September 29, 2008
    I am confused. Situation looks as follows: All test PC` have 192.168.0.1 as default gateway and have only one IP address set manually. FortiGate unit have two IP addresses: 10.0.0.1 (primary with PING enabled) and 192.168.0.1 (secondary with PING enabled). If I have only one address on my network card (192.168.0.100) and default gateway i set to 192.168.0.1, I can ping to other test PC`s but i can not ping to FortiGate. FortiGate`s sniffer shows only:
    icmp: echo request
    When I change IP address to 10.0.0.100 (still is only one IP) and default gateway is set to 10.0.0.1, I can not ping to other test PC`s and I can ping to FortiGate on 10.0.0.1 and I can ping to FortiGate on 192.168.0.1 too!! FortiGate`s sniffer shows :
    icmp: echo request  icmp: echo reply
    UkWizard
    New Member
    September 29, 2008
    do you have any policy routes defined? what static routes do you have? do you have any other interfaces configured, and if so, whats their IP?
    rwpatterson
    New Member
    September 29, 2008
    I have seen times where you cannot ping to secondary interfaces on the FGT. I would discount that as a ' problem' . Also if you wish to have one subnet see the other with single IP addresses (on the work stations), you need to create a policy on the FGT like stated above, because the FGT must permit the traffic to cross via a policy.
    UkWizard
    New Member
    September 29, 2008
    Works okay on a test box here, and its running unpatched mr6 (660 build). What version are you running?
    kcerb
    kcerbAuthor
    New Member
    September 29, 2008
    Thanks everyone for Your time. UkWizard, I`m answering for Your questions: because I have two internet providers, I have two WAN interfaces enabled and I have link redundancy and load sharing. In Router I have two static routes (for WAN1 and WAN2) with the same distance.
      IP/Mask Gateway Device Distance   0.0.0.0/0.0.0.0 A1.B1.C1.D1 wan1 10       0.0.0.0/0.0.0.0 A2.B2.C2.D2 wan2 10       
    I have also one policy route to make WAN1 as preferred link:
      Incoming Outgoing Source Destination   internal wan1 0.0.0.0 / 0.0.0.0 0.0.0.0 / 0.0.0.0   
    I have doubled firewall policy internal -> wan1 and internal ->wan2 I have set ping servers to check if link is alive. Everything works fine but second internal IP doesn' t work. My firmware is: 3.00-b0670(MR6 Patch 3) Earlier it was 3.00-b0668 and there was the same problem. rwpatterson, all I want is to have two subnets with one device as internet gate. I do not want to see computers from one subnet to another. I only want to FortiGae act with two internal IP addresses and allow traffic from both subnets to internet.
    UkWizard
    New Member
    September 29, 2008
    i bet its the policy route breaking this, whether its by design or a bug. Just as a quick test to eliminate it, take the policy route out temporarily and retest. You will need the INT to INT policy as well to allow the routing. if it works without that policy route, try changing the source subnet for it as the main internal IP subnet, rather than 0.0.0.0 and then retest.
    kcerb
    kcerbAuthor
    New Member
    September 30, 2008
    ok. I deleted policy route and I deleted second static route (for additional internet provider). I also disabled all firewall rules except one. The state is now: FG internal primary IP: 10.0.0.1/24 (ping enabled) FG internal secondary IP: 192.168.0.1/24 (ping enabled) One static route:
      IP/Mask Gateway Device Distance  0.0.0.0/0.0.0.0 A.B.C.D2 wan1 10   
    No polisy routes. One firewall policy:
      internal -> wan1  ID  Source  Destination  Schedule  Service  Profile  Action   1 all  all  always ANY    ACCEPT   
    In routing monitor I see:
      Type Subtype Network Distance Metric Gateway Interface   Static   0.0.0.0/0 10 0 A.B.C.D2 wan1     Connected   10.0.0.0/24 0 0 0.0.0.0 internal     Connected   A.B.C.D1/29 0 0 0.0.0.0 wan1     Connected   192.168.0.0/24 0 0 0.0.0.0 internal   
    WAN2 interface is now disabled. I rebooted FortiGate. Form my primary subnet (my PC have only one IP address: 10.0.0.x and 10.0.0.1 as default gateway) I can accesss to internet. I can ping to FG using 10.0.0.1 an I can ping to FG using 192.168.0.1 too! From test computer (with only one IP address 192.168.0.x with 192.168.0.1 as default gateway) a can`t ping to 192.168.0.1 and I can`t go to the internet. I try with overlap enabled and disabled and always nothing.