本帖最後由 gfx86674 於 2018-2-20 15:08 編輯
- #CN:
- /interface sstp-client
- add authentication=pap certificate=cert connect-to=123.123.123.123:443 name=sstp-out1 password=123 user=123 verify-server-address-from-certificate=no
- /interface eoip
- add allow-fast-path=no mac-address=02:F1:04:27:75:96 name=eoip-tunnel1 tunnel-id=123 local-address=172.16.0.1 remote-address=172.16.0.0
- /interface bridge
- add name=bridge1 vlan-filtering=no
- /interface bridge port
- add bridge=bridge1 interface=eoip-tunnel1
- add bridge=bridge1 interface=sfp1 pvid=100
- add bridge=bridge1 interface=ether2 pvid=100
- add bridge=bridge1 interface=ether3 pvid=100
- add bridge=bridge1 interface=ether4 pvid=100
- add bridge=bridge1 interface=ether5 pvid=100
- add bridge=bridge1 interface=ether6 pvid=200
- add bridge=bridge1 interface=ether7 pvid=200
- add bridge=bridge1 interface=ether8 pvid=200
- /interface bridge vlan
- add bridge=bridge1 tagged=eoip-tunnel1 untagged=sfp1,ether2,ether3,ether4,ether5 vlan-ids=100
- add bridge=bridge1 tagged=eoip-tunnel1 untagged=ether6,ether7,ether8 vlan-ids=200
- /ip address
- add address=192.168.100.254/24 interface=sfp1 network=192.168.100.0
- /interface bridge set bridge1 vlan-filtering=yes
- /ip firewall nat
- set [find action="masquerade"] out-interface=ether1 dst-address=!192.168.200.0/24 !src-address
- add action=dst-nat chain=dstnat dst-port=53 protocol=udp src-address=192.168.100.201-192.168.100.250 to-addresses=172.16.0.0
- /ip firewall mangle
- add action=accept chain=prerouting dst-address=192.168.200.0/24
- add action=mark-routing chain=prerouting dst-address-type=!local dst-address-list=!cn new-routing-mark=vpn passthrough=no src-address=192.168.100.0/24
- /ip route
- add distance=2 dst-address=192.168.200.0/24 gateway=172.16.0.0
- add distance=3 gateway=172.16.0.1 routing-mark=vpn
- add distance=5 gateway=ether1
複製代碼- #HK:
- /interface sstp-server server
- set authentication=pap certificate=cert default-profile=default enabled=yes port=443
- /ppp secret
- add local-address=172.16.0.0 remote-address=172.16.0.1 name=123 password=123 routes="192.168.100.0/24 172.16.0.1 2" service=sstp
- /interface eoip
- add allow-fast-path=no mac-address=02:F1:04:27:96:75 name=eoip-tunnel1 tunnel-id=123 local-address=172.16.0.0 remote-address=172.16.0.1
- /ip dns
- set allow-remote-requests=yes
- /interface bridge
- add name=bridge1 vlan-filtering=no
- /interface bridge port
- add bridge=bridge1 interface=eoip-tunnel1
- add bridge=bridge1 interface=sfp1 pvid=200
- add bridge=bridge1 interface=ether2 pvid=200
- add bridge=bridge1 interface=ether3 pvid=200
- add bridge=bridge1 interface=ether4 pvid=200
- add bridge=bridge1 interface=ether5 pvid=200
- add bridge=bridge1 interface=ether6 pvid=100
- add bridge=bridge1 interface=ether7 pvid=100
- add bridge=bridge1 interface=ether8 pvid=100
- /interface bridge vlan
- add bridge=bridge1 tagged=eoip-tunnel1 untagged=sfp1,ether2,ether3,ether4,ether5 vlan-ids=200
- add bridge=bridge1 tagged=eoip-tunnel1 untagged=ether6,ether7,ether8 vlan-ids=100
- /ip address
- add address=192.168.200.254/24 interface=sfp1 network=192.168.200.0
- /interface bridge set bridge1 vlan-filtering=yes
- /ip firewall nat
- set [find action="masquerade"] out-interface=ether1 dst-address=!192.168.100.0/24 !src-address
- /ip firewall mangle
- add action=mark-routing chain=prerouting dst-address-list=cn new-routing-mark=vpn passthrough=no src-address=192.168.200.0/24
- /ip route
- add distance=3 gateway=172.16.0.1 routing-mark=vpn
- add distance=5 gateway=ether1
複製代碼 |