1 (edytowany przez KrzysiekP 2013-11-28 20:59:14)

Temat: Jak ustawić firewall dla VPN CheckPoint

Mam problem z VPN CheckPoint. Po podłączeniu się łączy i przez kilka sek jest ok.
Po próbie rozpoczęcia transmisji się rozłacza ...

Nie wiem co zmienić w ustawieniach firewalla i proszę o pomoc co pozmieniać.

Łącze się poprzez wan1 lub Wan, które reprezentują połączenia przez modemy 3g Orange i Plusa w zależności od pory i limitów jakie mam.
Problemy z VPN są niezależnie czy łącze się poprzez połaczenie kablowe czy też WiFi.

ustawienia firewall:

config defaults
    option syn_flood '1'
    option input 'ACCEPT'
    option output 'ACCEPT'
   
    option forward 'ACCEPT'
    option force_router_dns '1'

config zone
    option name 'lan'
    option network 'lan'
    option input 'ACCEPT'
    option output 'ACCEPT'
    option forward 'REJECT'

config zone
    option name 'wan'
    option network 'wan wan1'
    option input 'ACCEPT'
    option output 'ACCEPT'
    option forward 'REJECT'
    option masq '1'
    option mtu_fix '1'

config forwarding
    option src 'lan'
    option dest 'wan'

config rule
    option name 'Allow-DHCP-Renew'
    option src 'wan'
    option proto 'udp'
    option dest_port '68'
    option target 'ACCEPT'
    option family 'ipv4'

config rule
    option name 'Allow-Ping'
    option src 'wan'
    option proto 'icmp'
    option icmp_type 'echo-request'
    option family 'ipv4'
    option target 'ACCEPT'

config rule
    option name 'Allow-DHCPv6'
    option src 'wan'
    option proto 'udp'
    option src_ip 'fe80::/10'
    option src_port '547'
    option dest_ip 'fe80::/10'
    option dest_port '546'
    option family 'ipv6'
    option target 'ACCEPT'

config rule
    option name 'Allow-ICMPv6-Input'
    option src 'wan'
    option proto 'icmp'
    list icmp_type 'echo-request'
    list icmp_type 'echo-reply'
    list icmp_type 'destination-unreachable'
    list icmp_type 'packet-too-big'
    list icmp_type 'time-exceeded'
    list icmp_type 'bad-header'
    list icmp_type 'unknown-header-type'
    list icmp_type 'router-solicitation'
    list icmp_type 'neighbour-solicitation'
    list icmp_type 'router-advertisement'
    list icmp_type 'neighbour-advertisement'
    option limit '1000/sec'
    option family 'ipv6'
    option target 'ACCEPT'

config rule
    option name 'Allow-ICMPv6-Forward'
    option src 'wan'
    option dest '*'
    option proto 'icmp'
    list icmp_type 'echo-request'
    list icmp_type 'echo-reply'
    list icmp_type 'destination-unreachable'
    list icmp_type 'packet-too-big'
    list icmp_type 'time-exceeded'
    list icmp_type 'bad-header'
    list icmp_type 'unknown-header-type'
    option limit '1000/sec'
    option family 'ipv6'
    option target 'ACCEPT'

config include
    option path '/etc/firewall.user'

config include
    option path '/usr/lib/gargoyle_firewall_util/gargoyle_additions.firewall'

config remote_accept 'ra_9222_9222'
    option local_port '9222'
    option remote_port '9222'
    option proto 'tcp'
    option zone 'wan'

config dmz 'dmz'
    option from 'wan'
    option to_ip '192.168.222.111'

2

Odp: Jak ustawić firewall dla VPN CheckPoint

A jak połączysz się normalnym wanem (kabel) to też tak jest? Masz wykupione publiczne ip że dmz masz ustawione?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

3 (edytowany przez KrzysiekP 2013-11-28 21:09:35)

Odp: Jak ustawić firewall dla VPN CheckPoint

Jak podłączę się z tego modemu 3g USD bezpośrednio na usb do kompa bez routera to jest ok.
Z tego powodu najwyraźniej to router z openwrt coś ucina po podłaczeniu.

Nie mam wykupionej specjalnej dodatkowej usługi w Orange, to DMZ to ustawiłem tak bezpośrednio na ip kompa z jakiego chce się połaczyć VPN ale też nie pomaga ;-(

4

Odp: Jak ustawić firewall dla VPN CheckPoint

domyślam się że chodzi o ipsec
jak rozumiem nie korzystasz z nat-t
niestety wiele razy naciąłem się na moduły nat od ipsec więc nie polecam z nich korzystać jeśli je masz wyładuj je i żeby była jasność nie dotyczy to tylko openwrt ale ogólnie różnie się to zachowywało w innych dystrybucjach

a możesz napisać co w logach piszczy checkpointa ?

mam pytanie czy aby nie jest tak że oba wan są aktywne ? Bo jeśli tak to czy nie jest tak że pakiety wychodzą jednym łączem a wracają drugim ? Albo na zmiane są wysyłane jednym i drugim łączem ? Też się z taką sytuacją spotkałem kiedyś.

poza tym przydał by się iptables -L -v z routera z regułami po zerwaniu połączenia może tam coś siedzi i wpada źle

jakby openwrt był docelowy to bym powiedział, wyłączyć znakowanie pakietów bo to niszczy pakiety ipseca ale przy forwardzie to raczej nie to

gdybać to se można

5 (edytowany przez KrzysiekP 2013-11-28 23:55:34)

Odp: Jak ustawić firewall dla VPN CheckPoint

wynik:  iptables -L -v


Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target     prot opt in     out     source               destination         
61571   14M ACCEPT     all  --  any    any     anywhere             anywhere            ctstate RELATED,ESTABLISHED
    0     0 ACCEPT     all  --  lo     any     anywhere             anywhere           
14667  871K syn_flood  tcp  --  any    any     anywhere             anywhere            tcp flags:FIN,SYN,RST,ACK/SYN
36085 4403K input_rule  all  --  any    any     anywhere             anywhere           
36085 4403K input      all  --  any    any     anywhere             anywhere           

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target     prot opt in     out     source               destination         
65281   33M ACCEPT     all  --  any    any     anywhere             anywhere            ctstate RELATED,ESTABLISHED
12256  834K forwarding_rule  all  --  any    any     anywhere             anywhere           
12256  834K forward    all  --  any    any     anywhere             anywhere           

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target     prot opt in     out     source               destination         
75722   15M ACCEPT     all  --  any    any     anywhere             anywhere            ctstate RELATED,ESTABLISHED
    0     0 ACCEPT     all  --  any    lo      anywhere             anywhere           
9527 3254K output_rule  all  --  any    any     anywhere             anywhere           
9527 3254K output     all  --  any    any     anywhere             anywhere           

Chain forward (1 references)
pkts bytes target     prot opt in     out     source               destination         
12253  833K zone_lan_forward  all  --  br-lan any     anywhere             anywhere           
    0     0 zone_wan_forward  all  --  3g-wan1 any     anywhere             anywhere           

Chain forwarding_lan (1 references)
pkts bytes target     prot opt in     out     source               destination         

Chain forwarding_rule (1 references)
pkts bytes target     prot opt in     out     source               destination         

Chain forwarding_wan (1 references)
pkts bytes target     prot opt in     out     source               destination         

Chain input (1 references)
pkts bytes target     prot opt in     out     source               destination         
36070 4401K zone_lan   all  --  br-lan any     anywhere             anywhere           
    7   852 zone_wan   all  --  3g-wan1 any     anywhere             anywhere           

Chain input_lan (1 references)
pkts bytes target     prot opt in     out     source               destination         

Chain input_rule (1 references)
pkts bytes target     prot opt in     out     source               destination         

Chain input_wan (1 references)
pkts bytes target     prot opt in     out     source               destination         
    0     0            tcp  --  any    any     anywhere             anywhere            tcp dpt:9002 recent: SET name: SSH_CHECK side: source
    0     0 DROP       all  --  any    any     anywhere             anywhere            recent: UPDATE seconds: 300 hit_count: 11 name: SSH_CHECK side: source
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:9002

Chain output (1 references)
pkts bytes target     prot opt in     out     source               destination         
9527 3254K zone_lan_ACCEPT  all  --  any    any     anywhere             anywhere           
2206  154K zone_wan_ACCEPT  all  --  any    any     anywhere             anywhere           

Chain output_rule (1 references)
pkts bytes target     prot opt in     out     source               destination         

Chain reject (4 references)
pkts bytes target     prot opt in     out     source               destination         
    0     0 REJECT     tcp  --  any    any     anywhere             anywhere            reject-with tcp-reset
    1    78 REJECT     all  --  any    any     anywhere             anywhere            reject-with icmp-port-unreachable

Chain syn_flood (1 references)
pkts bytes target     prot opt in     out     source               destination         
14422  856K RETURN     tcp  --  any    any     anywhere             anywhere            tcp flags:FIN,SYN,RST,ACK/SYN limit: avg 25/sec burst 50
  245 14700 DROP       all  --  any    any     anywhere             anywhere           

Chain zone_lan (1 references)
pkts bytes target     prot opt in     out     source               destination         
36070 4401K input_lan  all  --  any    any     anywhere             anywhere           
36070 4401K zone_lan_ACCEPT  all  --  any    any     anywhere             anywhere           

Chain zone_lan_ACCEPT (2 references)
pkts bytes target     prot opt in     out     source               destination         
7321 3099K ACCEPT     all  --  any    br-lan  anywhere             anywhere           
36070 4401K ACCEPT     all  --  br-lan any     anywhere             anywhere           

Chain zone_lan_DROP (0 references)
pkts bytes target     prot opt in     out     source               destination         
    0     0 DROP       all  --  any    br-lan  anywhere             anywhere           
    0     0 DROP       all  --  br-lan any     anywhere             anywhere           

Chain zone_lan_REJECT (1 references)
pkts bytes target     prot opt in     out     source               destination         
    0     0 reject     all  --  any    br-lan  anywhere             anywhere           
    1    78 reject     all  --  br-lan any     anywhere             anywhere           

Chain zone_lan_forward (1 references)
pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     all  --  br-lan br-lan  anywhere             anywhere           
12253  833K zone_wan_ACCEPT  all  --  any    any     anywhere             anywhere           
    1    78 forwarding_lan  all  --  any    any     anywhere             anywhere           
    1    78 zone_lan_REJECT  all  --  any    any     anywhere             anywhere           

Chain zone_wan (1 references)
pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     udp  --  any    any     anywhere             anywhere            udp dpt:bootpc
    0     0 ACCEPT     icmp --  any    any     anywhere             anywhere            icmp echo-request
    7   852 input_wan  all  --  any    any     anywhere             anywhere           
    7   852 zone_wan_ACCEPT  all  --  any    any     anywhere             anywhere           

Chain zone_wan_ACCEPT (3 references)
pkts bytes target     prot opt in     out     source               destination         
14458  988K ACCEPT     all  --  any    3g-wan1  anywhere             anywhere           
    7   852 ACCEPT     all  --  3g-wan1 any     anywhere             anywhere           

Chain zone_wan_DROP (0 references)
pkts bytes target     prot opt in     out     source               destination         
    0     0 DROP       all  --  any    3g-wan1  anywhere             anywhere           
    0     0 DROP       all  --  3g-wan1 any     anywhere             anywhere           

Chain zone_wan_REJECT (1 references)
pkts bytes target     prot opt in     out     source               destination         
    0     0 reject     all  --  any    3g-wan1  anywhere             anywhere           
    0     0 reject     all  --  3g-wan1 any     anywhere             anywhere           

Chain zone_wan_forward (1 references)
pkts bytes target     prot opt in     out     source               destination         
    0     0 forwarding_wan  all  --  any    any     anywhere             anywhere           
    0     0 zone_wan_REJECT  all  --  any    any     anywhere             anywhere