Re: Routes for interface



Ludovit Koren:
is there any possibility to set the routing statically on a multi-homed
host so, that the packet is sent back via the same interface, as it has
came from?

ipfw(4) is your friend, for example on a box with addresses
192.168.20.31 and 172.16.164.54 with respective gateways 192.168.21.254
and 172.16.164.1:

00100 31716 3368679 allow ip from 192.168.20.31 to 192.168.20.0/23
00200 671653 64044345 fwd 192.168.21.254 ip from 192.168.20.31 to any
00300 59889 3353166 allow ip from 172.16.164.54 to 172.16.164.0/22
00400 317 28628 fwd 172.16.164.1 ip from 172.16.164.54 to any
00500 7075682 948430737 allow ip from any to any
65535 0 0 deny ip from any to any

Helge
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: 2.4.23 masquerading broken?
    ... It happens when a packet to a host outside 130.89.*.* is routed through ... traffic is routed to the other Internet interface without any problems. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: 6.2 mtu now limits size of incomming packet
    ... Incoming interface must have mtu set to the same mtu as all other hosts ... Thus the router can accept the incoming packet but may ... host on internet ...
    (freebsd-net)
  • Re: Company Firewalls IP Address
    ... The packets have the firewall's external interface ip as their destination ... the firewall handles the address translation back to the internal ... When you initiate an outbound connection from an internal host, ... field of the ip packet, and the firewall stores the source port 'p'. ...
    (Security-Basics)
  • Re: Routes for interface
    ... host so, that the packet is sent back via the same interface, as it has ... You could probably achieve this using IPFW FWD (this is how I achieve ...
    (freebsd-net)
  • Re: Routes for interface
    ... host so, that the packet is sent back via the same interface, as it has ... as an IPFW solution. ...
    (freebsd-net)