Netgate SG-1000 microFirewall

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - lifeboy

Pages: [1] 2
1
IPsec / IPSec phase2 with NAT/BINAT both sides fails to communicate
« on: February 09, 2018, 06:03:41 pm »
When I set up an IPSec tunnel with phase2 using NAT/BINAT, communication to the NAT'ed side stops.

When I remote the NAT/BINAT, all is well. 

I have read https://forum.pfsense.org/index.php?topic=132486.0 which seems quite similar, except that my far side is not Azure, but another of pfSense box that I have control over. 

Of course, if this was my "live" setup, I could just not use NAT, but in the final setup, I need to connect to a service provider who doesn't allow us to do comms over private ip addresses.

Has anyone run into this and how did you fix it?

2
DHCP and DNS / Re: Alias resolution somewhat cripple
« on: September 19, 2017, 03:26:08 pm »
Thanks for your responses! 

I rechecked the aliases vs the results of a dig / drill of the name and it does indeed add all the addresses correctly.  I had quite some problems with this in the past, but I never really figured out how I could check the resolution.  I didn't know about diagnostics | tables.


3
DHCP and DNS / Alias resolution somewhat cripple
« on: September 12, 2017, 08:34:37 am »
I have noticed this before and would like to see if something can be done about this.

When an alias is added to pfSense, it seems that the name gets randomly resolved if there's more than one A record.  An example:

Code: [Select]
$ dig  httpredir.debian.org

; <<>> DiG 9.10.3-P4-Ubuntu <<>> httpredir.debian.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15753
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;httpredir.debian.org. IN A

;; ANSWER SECTION:
httpredir.debian.org. 3464 IN CNAME static.debian.org.
static.debian.org. 164 IN A 5.153.231.4
static.debian.org. 164 IN A 149.20.4.15
static.debian.org. 164 IN A 130.89.148.14
static.debian.org. 164 IN A 128.31.0.62

;; Query time: 6 msec
;; SERVER: 192.168.121.1#53(192.168.121.1)
;; WHEN: Tue Sep 12 15:12:00 SAST 2017
;; MSG SIZE  rcvd: 144

So if I add httpredir.debian.org, it doesn't work most of the time in a firewall rule and I have to manually add each ip address to the alias to get the desired result.

If would be really beneficial if a simple lookup could be done when a name (instead of an ip) is added to an alias and the appropriate records added.  Then one could have a refresh of the name (manually) or at startup or some other event to refresh records that have changed.

Mikrotik RouterOS has such a capability when one creates firewall address-lists.  You enter the name and the system resolves the records and add one or more to the list as may be required.  This really makes life so much easier.

Is something like this is the works or could it be added to a list of feature to be expanded?

thanks and regards

Roland

4
Since a recent upgrade (I'm on 2.3.2_1 now), in many places in the GUI virtually only a-z, A-Z, 0-9 seem to be allowed.  Previously this was not the case.  Now I can't even use an _ in an alias name for instance.  Or an @ or $ in a password.  While it is possible to use simpler strings, specifically in the instance of passwords, this significantly reduces the security of a password.  Strangely enough, anything already stored in a config somewhere continues to be accepted, it's only new passwords and other entries that are not allowed to have even the simplest special characters.

I suppose this is a bug, since I cannot believe that this is a design decision or is it?

An example:
Setting a L2TP user's password which includes a @, results in this:
The password contains invalid characters.

What's going on here?

thanks

5
I have a curious problem.  A perfectly working pfSense KVM machine (configured as per my post here: https://forum.pfsense.org/index.php?topic=88858.msg491311#msg491311 ), has the following symptoms now.
  • I have two bridges on the host machine: vmbr0 (LAN) and vmbr1 (WAN).   Both have tx checksumming turned off.
  • When I start the VM guest with pfSense, I cannot communicate with it via the WAN or LAN port.  All I can do is see via the KVM (proxmox)  console that it's up and it claims the ports are up.
  • When I try to ping the WAN gateway ip though, I get "host is down".  Pinging a LAN host IP just gives no response.
  • When I change the VM guest config to have both WAN and LAN on the LAN bridge (vmbr0) I can actually reach the guest via the WAN port public ip, but pfsense then is not able to "talk" to the LAN.  The WAN port seems to be working though??
Anyone have any idea what changed from Debian 7 to 8 that may be causing this?

6
I was stuck with this issue, no replies, so I went through all the settings again.  Lo and behold!  There was no upstream gateway set on the WAN port (although I'm sure it was there at some stage before).



After setting it, all is well.

7
Since finding out some address route to the internet and others not, I checked which actually do route.  Turns out that only those with 1:1 NAT entries in pfSense can access the internet.

In Firewall: NAT: Outbound I have selected "Automatic outbound NAT rule generation (IPsec passthrough included) ".   It seems that this is not sufficient.

What should I do to make this work as expected?  Should I remove the 1:1 NAT and only put in inbound NAT rules?

8
(I have renamed the question to more correctly describe the symptoms)

If have done a lot of digging and testing re this issue and the news is somewhat better than I at first reported:

The routing works from some of the virtual machines, but not from others. 

To illustrate the point:

machine A: www

www:~$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether ca:04:b6:f7:84:c4 brd ff:ff:ff:ff:ff:ff
    inet 192.168.121.38/24 brd 192.168.121.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::c804:b6ff:fef7:84c4/64 scope link
       valid_lft forever preferred_lft forever

@www:~$ ip route show
default via 192.168.121.1 dev eth0
192.168.121.0/24 dev eth0  proto kernel  scope link  src 192.168.121.38

machine B: redmine

redmine:~$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 3a:50:f6:52:b9:24 brd ff:ff:ff:ff:ff:ff
    inet 192.168.121.50/24 brd 192.168.121.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::3850:f6ff:fe52:b924/64 scope link
       valid_lft forever preferred_lft forever

redmine:~$ ip route show
default via 192.168.121.1 dev eth0
192.168.121.0/24 dev eth0  proto kernel  scope link  src 192.168.121.50

Both machines are configured with the same virtual hardware, yet machine A can access the internet (anything beyond the pfSense WAN port) while machine B can only access up to the WAN port, but not beyond that.

I have shut down machine A and then change machine B's ip address to 12.168.121.38 and when I restart it, it can access the internet perfectly.

So this all points to some obscure setting in pfSense that allows 192.168.121.38 out, but 192.168.121.50 not.

Were could that be?




9
/etc/defaults/rc.conf is NOT the place to mess with.

Not, I won't mess with anything, especially in freeBSD!  I was just looking around to see what I can discover to give me an indication of what may be causing the problem.  I'm pretty sure I didn't change anything since I upgraded, since everything "just worked" once it was set up.

So what do I do next?

10
I also see this:

Code: [Select]
cat /etc/defaults/rc.conf | grep gateway
defaultrouter="NO" # Set to default gateway (or NO).
gateway_enable="NO" # Set to YES if this host will be a gateway.
ipxgateway_enable="NO" # Set to YES to enable IPX routing.
forward_sourceroute="NO" # do source routing (only if gateway_enable is set to "YES")
ipv6_defaultrouter="NO" # Set to IPv6 default gateway (or NO).
ipv6_gateway_enable="NO" # Set to YES if this host will be a gateway.
# ipv6_gateway_enable="NO".

Is that the way it's supposed to be with pfSense?  It's seems like freeBSD's routing is turned off, or what?

11
I upgraded not too long ago and noticed yesterday that no servers behind pfSense were receiving any updates.  It no traffic is going out, only incoming traffic is working.

pfSense runs in a KVM virtual machine under Proxmox and all was well using pfSense 2.2.2.

Both ports are bridged in the VM host platform configured as follows:

Code: [Select]
# cat /etc/network/interfaces
# network interface settings
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto eth1
iface eth1 inet manual

auto eth3
iface eth3 inet manual

iface eth2 inet manual

auto bond0
iface bond0 inet manual
slaves eth0 eth1
bond_miimon 100
bond_mode 802.3ad
bond_xmit_hash_policy layer2

auto vmbr0
iface vmbr0 inet static
address  192.168.121.33
netmask  255.255.255.0
gateway  192.168.121.1
bridge_ports bond0
bridge_stp off
bridge_fd 0
# gateway  192.168.121.1

auto vmbr1
iface vmbr1 inet manual
bridge_ports eth3
bridge_stp off
bridge_fd 0

Therefore the KVM host cannot reach anything on the WAN port, since there is no IP address allocated.

The pfSense basic config is:
1 WAN port (vtnet1)
1 LAN port (vtnet0)
7 Virtual IP defined
I connect to the LAN via IPsec/L2tp and can access all the servers/services in this way.

Problem is that no traffic is passed beyond the WAN port.  I can ping xxx.71.69.226 (the WAN port address), but not 225, which is the gateway.  However, from xxx.71.69.226 I can ping the 225 gateway and anything else outside.

Here's the routing table:

Code: [Select]
$ netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags      Netif Expire
default            41.71.69.225       UGS      vtnet1
xxx.71.69.224/28    link#2             U        vtnet1
xxx.71.69.226       link#2             UHS         lo0
xxx.71.69.228       link#2             UHS         lo0
xxx.71.69.228/32    link#2             U        vtnet1
xxx.71.69.229       link#2             UHS         lo0
xxx.71.69.229/32    link#2             U        vtnet1
xxx.71.69.230       link#2             UHS         lo0
xxx.71.69.230/32    link#2             U        vtnet1
xxx.71.69.231       link#2             UHS         lo0
xxx.71.69.231/32    link#2             U        vtnet1
xxx.71.69.232       link#2             UHS         lo0
xxx.71.69.232/32    link#2             U        vtnet1
xxx.71.69.233       link#2             UHS         lo0
xxx.71.69.233/32    link#2             U        vtnet1
xxx.71.69.234       link#2             UHS         lo0
xxx.71.69.234/32    link#2             U        vtnet1
127.0.0.1          link#5             UH          lo0
192.168.120.240    link#7             UH        l2tp0
192.168.120.241    link#8             UH        l2tp1
192.168.120.248    link#7             UHS         lo0
192.168.121.0/24   link#1             U        vtnet0
192.168.121.1      link#1             UHS         lo0

The default gateway should receive all the traffic, but it's not happening.  Is there a freeBSD method to disable/enable routing (like Linux has), or is routing always allowed by default?

I don't know how to troubleshoot this any further, so I need some help please.

12
IPsec / Re: Moblie ipsec limited to one entry
« on: March 17, 2015, 05:52:05 am »
Is it just mobile IPsec that is limited to this or is it IPSec of pfSense in general?  If one can have multiple configurations for different clients, then how is this achieved?

13
IPsec / Re: IPsec Phase 2 kills secondary LAN Link
« on: March 17, 2015, 05:03:37 am »
It looks like you're overcomplicating things:  Why do you have a different subnet for the machines on the same lan?  If you need that for some reason, then please post your exact configuration (if they're private ip addresses you can post them, just change your public addresses) and rules you've set.

14
I've actually tested this on older versions of OSX.  10.6 doens't work either and gives the same result.

Is it possible to set up different phase1/2 setups for different clients?  I have permanent connections via VPN that work well and I don't want to break them, so if I could set up a different set of server settings, maybe that would allow me to connect?  I don't know how this would work though...

15
pfSense is set up as described here, except that some of the options are not shown in pfSense 2.2 any more.

I can connect from Linux (Ubuntu) & Mikrotik successfully.

However, OSX just plays dumb.  Using OSX 10.10.2 with the native client as described here, I get the following in the /var/log/system.log regardless of what changes I try on the server.  There's pretty much nothing to change on the client.  It has so few options to set.

Code: [Select]
Mar 16 23:23:12 Carel-Macbook-Pro.local pppd[6789]: pppd 2.4.2 (Apple version 786.10.1) started by carelvandermerwe, uid 501
Mar 16 23:23:12 Carel-Macbook-Pro.local pppd[6789]: l2tp_get_router_address
Mar 16 23:23:12 Carel-Macbook-Pro.local pppd[6789]: l2tp_get_router_address 192.168.88.1 from dict 1
Mar 16 23:23:12 Carel-Macbook-Pro.local pppd[6789]: L2TP connecting to server '41.yy.xx.130' (41.71.68.130)...
Mar 16 23:23:12 Carel-Macbook-Pro.local pppd[6789]: IPSec connection started
Mar 16 23:23:12 Carel-Macbook-Pro.local racoon[6790]: plogsetfile: about to add racoon log file: /var/log/racoon.log
Mar 16 23:23:12 Carel-Macbook-Pro.local racoon[6790]: accepted connection on vpn control socket.
Mar 16 23:23:12 --- last message repeated 1 time ---
Mar 16 23:23:12 Carel-Macbook-Pro.local racoon[6790]: Connecting.
Mar 16 23:23:12 Carel-Macbook-Pro.local racoon[6790]: IPSec Phase 1 started (Initiated by me).
Mar 16 23:23:12 --- last message repeated 1 time ---
Mar 16 23:23:12 Carel-Macbook-Pro.local racoon[6790]: IKE Packet: transmit success. (Initiator, Aggressive-Mode message 1).
Mar 16 23:23:12 Carel-Macbook-Pro.local racoon[6790]: >>>>> phase change status = Phase 1 started by us
Mar 16 23:23:13 --- last message repeated 1 time ---
Mar 16 23:23:13 Carel-Macbook-Pro.local racoon[6790]: none message must be encrypted
Mar 16 23:23:16 --- last message repeated 1 time ---
Mar 16 23:23:16 Carel-Macbook-Pro.local racoon[6790]: IKE Packet: transmit success. (Phase 1 Retransmit).
Mar 16 23:23:16 Carel-Macbook-Pro.local racoon[6790]: none message must be encrypted
Mar 16 23:23:19 --- last message repeated 1 time ---
Mar 16 23:23:19 Carel-Macbook-Pro.local racoon[6790]: IKE Packet: transmit success. (Phase 1 Retransmit).
Mar 16 23:23:19 Carel-Macbook-Pro.local racoon[6790]: none message must be encrypted
Mar 16 23:23:22 --- last message repeated 1 time ---
Mar 16 23:23:22 Carel-Macbook-Pro.local racoon[6790]: IKE Packet: transmit success. (Phase 1 Retransmit).
Mar 16 23:23:22 Carel-Macbook-Pro.local racoon[6790]: none message must be encrypted
Mar 16 23:23:22 --- last message repeated 1 time ---
Mar 16 23:23:22 Carel-Macbook-Pro.local pppd[6789]: IPSec connection failed
Mar 16 23:23:22 Carel-Macbook-Pro.local racoon[6790]: IPSec disconnecting from server 41.yy.xx.130
Mar 16 23:23:22 --- last message repeated 1 time ---
Mar 16 23:23:22 Carel-Macbook-Pro.local racoon[6790]: glob found no matches for path "/var/run/racoon/*.conf"

I have unloaded (stopped) and loaded (started) racoon on the Mac, it makes no difference.

I'm at a loss for other options. 

Does this work on a Mac?  I have even installed IPSecuritas, but it also gives a very similar error so I unstalled it again.

(Update: Also test on OSX 10.6, same problem)

Pages: [1] 2